diff --git a/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewViewModel.kt index 9eb97a0660..b856745e47 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewViewModel.kt @@ -171,6 +171,11 @@ class MediaOverviewViewModel( fun onItemClicked(item: MediaOverviewItem) { if (inSelectionMode.value) { + if (item.slide.hasDocument()) { + // We don't support selecting documents in selection mode + return + } + val newSet = mutableSelectedItemIDs.value.toMutableSet() if (item.id in newSet) { newSet.remove(item.id) @@ -213,11 +218,6 @@ class MediaOverviewViewModel( } fun onTabItemClicked(tab: MediaOverviewTab) { - if (inSelectionMode.value) { - // Not allowing to switch tabs while in selection mode - return - } - mutableSelectedTab.value = tab }