From 16355a53a1242d548a4b1329c11a4a8c1523f676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Fri, 21 Jul 2023 15:40:23 +0200 Subject: [PATCH] Disable hide/unhide options for filesystem hidden folders --- .../gallery/pro/adapters/DirectoryAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index dab4b2eab..68046252e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -193,10 +193,10 @@ class DirectoryAdapter( private fun checkHideBtnVisibility(menu: Menu, selectedPaths: ArrayList) { 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 = - (!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) {