From e8dd9144c14921a1a3843fbc9c05fa2a11bd1f36 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 2 Nov 2020 12:51:54 +0100 Subject: [PATCH] do not show file count on the main screen if it is disabled in settings --- .../gallery/pro/adapters/DirectoryAdapter.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index 567dd7850..e757a71aa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -697,7 +697,6 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList 1) "${directory.name} [${directory.subfoldersCount}]" else directory.name dir_path.text = "${directory.path.substringBeforeLast("/")}/" photo_cnt.setTextColor(textColor) photo_cnt.text = directory.subfoldersMediaCount.toString() @@ -705,8 +704,19 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList 1) { + "${directory.name} [${directory.subfoldersCount}]" + } else { + directory.name + } } else { - dir_name.text = if (groupDirectSubfolders && directory.subfoldersCount > 1) "${directory.name} [${directory.subfoldersCount}]" else "${directory.name} (${directory.subfoldersMediaCount})" + dir_name.text = if (groupDirectSubfolders && directory.subfoldersCount > 1) { + "${directory.name} [${directory.subfoldersCount}]" + } else if (showMediaCount) { + "${directory.name} (${directory.subfoldersMediaCount})" + } else { + directory.name + } } } }