From 367337843463bbfafddd00d83a5426f21da5fdaf Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 12 Sep 2019 22:51:42 +0200 Subject: [PATCH] show the recycle bin in some extra cases, if not empty --- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 2 +- .../com/simplemobiletools/gallery/pro/extensions/Context.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 63f6c8922..2535031c3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -950,7 +950,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { val foldersToScan = mediaFetcher.getFoldersToScan() foldersToScan.add(FAVORITES) - if (config.useRecycleBin && config.showRecycleBinAtFolders) { + if (config.showRecycleBinAtFolders) { foldersToScan.add(RECYCLE_BIN) } else { foldersToScan.remove(RECYCLE_BIN) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index 6132bb2ae..f5e94bd73 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -143,7 +143,7 @@ fun Context.movePinnedDirectoriesToFront(dirs: ArrayList): ArrayList< } } - if (config.useRecycleBin && config.showRecycleBinAtFolders && config.showRecycleBinLast) { + if (config.showRecycleBinAtFolders && config.showRecycleBinLast) { val binIndex = dirs.indexOfFirst { it.isRecycleBin() } if (binIndex != -1) { val bin = dirs.removeAt(binIndex) @@ -566,7 +566,7 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly: ArrayList() } - if (!config.showRecycleBinAtFolders || !config.useRecycleBin) { + if (!config.showRecycleBinAtFolders) { directories.removeAll { it.isRecycleBin() } }