From d96ca1eb679b53fab23feefe96d707b87754f109 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Thu, 9 Jun 2022 00:12:12 +0200 Subject: [PATCH] block selection of encrypted files as well as files that are not allowed to be re-shared Signed-off-by: Andy Scherzinger --- .../adapters/RemoteFileBrowserItemsListViewHolder.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/remotefilebrowser/adapters/RemoteFileBrowserItemsListViewHolder.kt b/app/src/main/java/com/nextcloud/talk/remotefilebrowser/adapters/RemoteFileBrowserItemsListViewHolder.kt index 24b1df6c6..64f21207c 100644 --- a/app/src/main/java/com/nextcloud/talk/remotefilebrowser/adapters/RemoteFileBrowserItemsListViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/remotefilebrowser/adapters/RemoteFileBrowserItemsListViewHolder.kt @@ -138,7 +138,8 @@ class RemoteFileBrowserItemsListViewHolder( private fun calculateSelectability(item: RemoteFileBrowserItem) { selectable = item.isFile && - (mimeTypeSelectionFilter == null || item.mimeType?.startsWith(mimeTypeSelectionFilter) == true) + (mimeTypeSelectionFilter == null || item.mimeType?.startsWith(mimeTypeSelectionFilter) == true) && + (item.isAllowedToReShare && !item.isEncrypted) } private fun calculateClickability(item: RemoteFileBrowserItem, selectableItem: Boolean) {