mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
show the "Temporarily show hidden" menu item only when hidden media arent shown
This commit is contained in:
parent
2b95a7f529
commit
0ee20b4604
2 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
menu.findItem(R.id.increase_column_count).isVisible = config.dirColumnCnt < 10
|
||||
menu.findItem(R.id.reduce_column_count).isVisible = config.dirColumnCnt > 1
|
||||
}
|
||||
menu.findItem(R.id.temporarily_show_hidden).isVisible = !config.showHiddenMedia
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -106,6 +107,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
mDirs.clear()
|
||||
}
|
||||
tryloadGallery()
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
|
@ -76,6 +76,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
mMedia.clear()
|
||||
}
|
||||
tryloadGallery()
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
@ -133,6 +134,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
findItem(R.id.open_camera).isVisible = mShowAll
|
||||
findItem(R.id.about).isVisible = mShowAll
|
||||
|
||||
findItem(R.id.temporarily_show_hidden).isVisible = !config.showHiddenMedia
|
||||
|
||||
findItem(R.id.increase_column_count).isVisible = config.mediaColumnCnt < 10
|
||||
findItem(R.id.reduce_column_count).isVisible = config.mediaColumnCnt > 1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue