make sure we hide the Recycle Bin folder if empty
This commit is contained in:
parent
f54616bf3f
commit
0856abfb83
1 changed files with 10 additions and 3 deletions
|
@ -864,9 +864,16 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getFavoritePaths().isEmpty()) {
|
if (getFavoritePaths().isEmpty()) {
|
||||||
val dirsFolder = dirs.firstOrNull { it.areFavorites() }
|
val favoritesFolder = dirs.firstOrNull { it.areFavorites() }
|
||||||
if (dirsFolder != null) {
|
if (favoritesFolder != null) {
|
||||||
invalidDirs.add(dirsFolder)
|
invalidDirs.add(favoritesFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.useRecycleBin) {
|
||||||
|
val binFolder = dirs.firstOrNull { it.path == RECYCLE_BIN }
|
||||||
|
if (binFolder != null && galleryDB.MediumDao().getDeletedMedia().isEmpty()) {
|
||||||
|
invalidDirs.add(binFolder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue