mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-04-02 20:51:19 +02:00
fix #1419, use the proper cover image at creating shortcuts
This commit is contained in:
parent
35bd124b0b
commit
dac85245ba
@ -357,7 +357,8 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||||||
val dir = getFirstSelectedItem() ?: return
|
val dir = getFirstSelectedItem() ?: return
|
||||||
val path = dir.path
|
val path = dir.path
|
||||||
val drawable = resources.getDrawable(R.drawable.shortcut_image).mutate()
|
val drawable = resources.getDrawable(R.drawable.shortcut_image).mutate()
|
||||||
activity.getShortcutImage(dir.tmb, drawable) {
|
val coverThumbnail = config.parseAlbumCovers().firstOrNull { it.tmb == dir.path }?.tmb ?: dir.tmb
|
||||||
|
activity.getShortcutImage(coverThumbnail, drawable) {
|
||||||
val intent = Intent(activity, MediaActivity::class.java)
|
val intent = Intent(activity, MediaActivity::class.java)
|
||||||
intent.action = Intent.ACTION_VIEW
|
intent.action = Intent.ACTION_VIEW
|
||||||
intent.putExtra(DIRECTORY, path)
|
intent.putExtra(DIRECTORY, path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user