From 8b38cb36b3295e8a19ebe9f3a3e6123209af814c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abel=20Garc=C3=ADa=20de=20Prada?= Date: Wed, 4 May 2022 09:11:35 +0200 Subject: [PATCH] Don't show select all option when all files are selected --- .../presentation/ui/files/filelist/MainFileListFragment.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/ui/files/filelist/MainFileListFragment.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/ui/files/filelist/MainFileListFragment.kt index 744fd2acd0c..462c7e44e8f 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/ui/files/filelist/MainFileListFragment.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/ui/files/filelist/MainFileListFragment.kt @@ -106,8 +106,6 @@ class MainFileListFragment : Fragment(), var actionMode: ActionMode? = null - var enableSelectAll = true - private var statusBarColorActionMode: Int? = null private var statusBarColor: Int? = null @@ -492,7 +490,6 @@ class MainFileListFragment : Fragment(), when (menuId) { R.id.action_share_file -> { containerActivity?.fileOperationsHelper?.showShareFile(singleFile) - enableSelectAll = false return true } R.id.action_open_file_with -> { @@ -677,7 +674,7 @@ class MainFileListFragment : Fragment(), fileMenuFilter.filter( menu, - enableSelectAll, + checkedCount != fileListAdapter.itemCount - 1, // -1 because one of them is the footer :S true, fileListOption.isAvailableOffline(), fileListOption.isSharedByLink()