hide the Favorites folder if all items are hidden and they shouldnt be shown
This commit is contained in:
parent
f186889a78
commit
d78eff3cee
|
@ -652,6 +652,14 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun gotDirectories(newDirs: ArrayList<Directory>) {
|
private fun gotDirectories(newDirs: ArrayList<Directory>) {
|
||||||
|
// if hidden item showing is disabled but all Favorite items are hidden, hide the Favorites folder
|
||||||
|
if (!config.shouldShowHidden) {
|
||||||
|
val favoritesFolder = newDirs.firstOrNull { it.areFavorites() }
|
||||||
|
if (favoritesFolder != null && favoritesFolder.tmb.getFilenameFromPath().startsWith('.')) {
|
||||||
|
newDirs.remove(favoritesFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val dirs = getSortedDirectories(newDirs)
|
val dirs = getSortedDirectories(newDirs)
|
||||||
var isPlaceholderVisible = dirs.isEmpty()
|
var isPlaceholderVisible = dirs.isEmpty()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue