mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
[SES-2733] Preventing files from being selected in media overview
This commit is contained in:
parent
01a702ba9c
commit
06095ceeab
@ -171,6 +171,11 @@ class MediaOverviewViewModel(
|
|||||||
|
|
||||||
fun onItemClicked(item: MediaOverviewItem) {
|
fun onItemClicked(item: MediaOverviewItem) {
|
||||||
if (inSelectionMode.value) {
|
if (inSelectionMode.value) {
|
||||||
|
if (item.slide.hasDocument()) {
|
||||||
|
// We don't support selecting documents in selection mode
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val newSet = mutableSelectedItemIDs.value.toMutableSet()
|
val newSet = mutableSelectedItemIDs.value.toMutableSet()
|
||||||
if (item.id in newSet) {
|
if (item.id in newSet) {
|
||||||
newSet.remove(item.id)
|
newSet.remove(item.id)
|
||||||
@ -213,11 +218,6 @@ class MediaOverviewViewModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun onTabItemClicked(tab: MediaOverviewTab) {
|
fun onTabItemClicked(tab: MediaOverviewTab) {
|
||||||
if (inSelectionMode.value) {
|
|
||||||
// Not allowing to switch tabs while in selection mode
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
mutableSelectedTab.value = tab
|
mutableSelectedTab.value = tab
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user