Skip to content

Commit 1fcc63e

Browse files
committed
uset the proper file icon at creating a shortcut
1 parent 6b6a4ac commit 1fcc63e

File tree

1 file changed

+1
-1
lines changed
  • app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
290290
drawable.findDrawableByLayerId(R.id.shortcut_folder_background).applyColorFilter(0)
291291
drawable.setDrawableByLayerId(R.id.shortcut_folder_image, bitmap)
292292
} catch (e: Exception) {
293-
val fileIcon = activity.resources.getDrawable(R.drawable.ic_file_generic)
293+
val fileIcon = fileDrawables.getOrElse(path.substringAfterLast(".").toLowerCase(), { fileDrawable })
294294
drawable.setDrawableByLayerId(R.id.shortcut_folder_image, fileIcon)
295295
}
296296

0 commit comments

Comments
 (0)