Disable hide/unhide options for filesystem hidden folders

This commit is contained in:
Ensar Sarajčić 2023-07-21 15:40:23 +02:00
parent 345f314a44
commit 16355a53a1

View file

@ -193,10 +193,10 @@ class DirectoryAdapter(
private fun checkHideBtnVisibility(menu: Menu, selectedPaths: ArrayList<String>) { private fun checkHideBtnVisibility(menu: Menu, selectedPaths: ArrayList<String>) {
menu.findItem(R.id.cab_hide).isVisible = menu.findItem(R.id.cab_hide).isVisible =
(!isRPlus() || isExternalStorageManager()) && selectedPaths.any { !it.doesThisOrParentHaveNoMedia(HashMap(), null) } (!isRPlus() || isExternalStorageManager()) && selectedPaths.any { !it.doesThisOrParentHaveNoMedia(HashMap(), null) && !File(it).isHidden }
menu.findItem(R.id.cab_unhide).isVisible = menu.findItem(R.id.cab_unhide).isVisible =
(!isRPlus() || isExternalStorageManager()) && selectedPaths.any { it.doesThisOrParentHaveNoMedia(HashMap(), null) } (!isRPlus() || isExternalStorageManager()) && selectedPaths.any { it.doesThisOrParentHaveNoMedia(HashMap(), null) && !File(it).isHidden }
} }
private fun checkPinBtnVisibility(menu: Menu, selectedPaths: ArrayList<String>) { private fun checkPinBtnVisibility(menu: Menu, selectedPaths: ArrayList<String>) {