mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-01-22 06:45:30 +01:00
do not show all top menu items at Recents tab
This commit is contained in:
parent
39eb160f6b
commit
4e5d55be9f
@ -133,13 +133,16 @@ class MainActivity : SimpleActivity() {
|
||||
val currentFragment = getCurrentFragment()
|
||||
|
||||
menu!!.apply {
|
||||
findItem(R.id.add_favorite).isVisible = !favorites.contains(currentFragment.currentPath)
|
||||
findItem(R.id.remove_favorite).isVisible = favorites.contains(currentFragment.currentPath)
|
||||
findItem(R.id.go_to_favorite).isVisible = favorites.isNotEmpty()
|
||||
findItem(R.id.search).isVisible = currentFragment is ItemsFragment
|
||||
findItem(R.id.sort).isVisible = currentFragment is ItemsFragment
|
||||
|
||||
findItem(R.id.add_favorite).isVisible = currentFragment is ItemsFragment && !favorites.contains(currentFragment.currentPath)
|
||||
findItem(R.id.remove_favorite).isVisible = currentFragment is ItemsFragment && favorites.contains(currentFragment.currentPath)
|
||||
findItem(R.id.go_to_favorite).isVisible = currentFragment is ItemsFragment && favorites.isNotEmpty()
|
||||
|
||||
findItem(R.id.toggle_filename).isVisible = config.getFolderViewType(currentFragment.currentPath) == VIEW_TYPE_GRID
|
||||
findItem(R.id.go_home).isVisible = currentFragment.currentPath != config.homeFolder
|
||||
findItem(R.id.set_as_home).isVisible = currentFragment.currentPath != config.homeFolder
|
||||
findItem(R.id.go_home).isVisible = currentFragment is ItemsFragment && currentFragment.currentPath != config.homeFolder
|
||||
findItem(R.id.set_as_home).isVisible = currentFragment is ItemsFragment && currentFragment.currentPath != config.homeFolder
|
||||
|
||||
findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
|
||||
findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden
|
||||
|
Loading…
Reference in New Issue
Block a user