fix #416, hide the Go To Home folder when it is the current path

This commit is contained in:
tibbi 2020-09-27 10:59:07 +02:00
parent 723f8481c3
commit 935119f998
2 changed files with 2 additions and 0 deletions

View File

@ -89,6 +89,7 @@ class MainActivity : SimpleActivity() {
findItem(R.id.remove_favorite).isVisible = favorites.contains(fragment.currentPath)
findItem(R.id.go_to_favorite).isVisible = favorites.isNotEmpty()
findItem(R.id.go_home).isVisible = fragment.currentPath != config.homeFolder
findItem(R.id.set_as_home).isVisible = fragment.currentPath != config.homeFolder
findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden

View File

@ -151,6 +151,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
FileDirItem.sorting = context!!.config.getFolderSorting(currentPath)
listItems.sort()
activity?.runOnUiThread {
activity?.invalidateOptionsMenu()
addItems(listItems, forceRefresh)
}
}