diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 46211993b..a3ef6ea65 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -864,9 +864,16 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } if (getFavoritePaths().isEmpty()) { - val dirsFolder = dirs.firstOrNull { it.areFavorites() } - if (dirsFolder != null) { - invalidDirs.add(dirsFolder) + val favoritesFolder = dirs.firstOrNull { it.areFavorites() } + if (favoritesFolder != null) { + invalidDirs.add(favoritesFolder) + } + } + + if (config.useRecycleBin) { + val binFolder = dirs.firstOrNull { it.path == RECYCLE_BIN } + if (binFolder != null && galleryDB.MediumDao().getDeletedMedia().isEmpty()) { + invalidDirs.add(binFolder) } }