do not show the "Set as home folder" menu if at home

This commit is contained in:
tibbi 2019-11-28 19:59:00 +01:00
parent ff5e43835f
commit 2c83e9a14e

View File

@ -99,6 +99,8 @@ class MainActivity : SimpleActivity() {
findItem(R.id.remove_favorite).isVisible = favorites.contains(fragment.currentPath) findItem(R.id.remove_favorite).isVisible = favorites.contains(fragment.currentPath)
findItem(R.id.go_to_favorite).isVisible = favorites.isNotEmpty() findItem(R.id.go_to_favorite).isVisible = favorites.isNotEmpty()
findItem(R.id.set_as_home).isVisible = fragment.currentPath != config.homeFolder
findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden
} }