From d7f697572e153e7a84270c3acb74acf43d68040d Mon Sep 17 00:00:00 2001 From: SessionHero01 <180888785+SessionHero01@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:53:16 +1100 Subject: [PATCH] Remove three dot menu for kicked group (#984) --- .../securesms/conversation/v2/ConversationViewModel.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt index c1d8b6a2ea..ceb8cefa5e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt @@ -201,13 +201,11 @@ class ConversationViewModel( } val showOptionsMenu: Boolean - get() { - if (isMessageRequestThread) { - return false - } + get() = !isMessageRequestThread && !isDeprecatedLegacyGroup && !isKickedGroupV2Thread - return !isDeprecatedLegacyGroup - } + private val isKickedGroupV2Thread: Boolean + get() = recipient?.isGroupV2Recipient == true && + configFactory.getGroup(AccountId(recipient!!.address.toString()))?.kicked == true private val isDeprecatedLegacyGroup: Boolean get() = recipient?.isLegacyGroupRecipient == true && legacyGroupDeprecationManager.isDeprecated