Disable selecting message for post deprecated legacy groups (#950)

pull/1710/head
SessionHero01 2 months ago committed by GitHub
parent f3b8dd5d37
commit f5a76b23e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -353,9 +353,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
handleSwipeToReply(message)
},
onItemLongPress = { message, position, view ->
if (!viewModel.isMessageRequestThread &&
viewModel.canReactToMessages
) {
if (!viewModel.isMessageRequestThread) {
showConversationReaction(message, view)
} else {
selectMessage(message, position)

@ -552,11 +552,14 @@ class ConversationReactionOverlay : FrameLayout {
val openGroup = lokiThreadDatabase.getOpenGroupChat(message.threadId)
val userPublicKey = textSecurePreferences.getLocalNumber()!!
val isDeprecatedLegacyGroup = recipient.isLegacyGroupRecipient &&
deprecationManager.isDeprecated
// control messages and "marked as deleted" messages can only delete
val isDeleteOnly = message.isDeleted || message.isControlMessage
// Select message
if(!isDeleteOnly) {
if(!isDeleteOnly && !isDeprecatedLegacyGroup) {
items += ActionItem(
R.attr.menu_select_icon,
R.string.select,
@ -565,10 +568,6 @@ class ConversationReactionOverlay : FrameLayout {
)
}
val isDeprecatedLegacyGroup = recipient.isLegacyGroupRecipient &&
deprecationManager.isDeprecated
// Reply
val canWrite = openGroup == null || openGroup.canWrite
if (canWrite && !message.isPending && !message.isFailed && !message.isOpenGroupInvitation && !isDeleteOnly

@ -60,7 +60,6 @@ class ConversationActionModeCallback(
}
// Delete message
menu.findItem(R.id.menu_context_delete_message).isVisible = !isDeprecatedLegacyGroup // can always delete since delete logic will be handled by the VM
// Ban user

Loading…
Cancel
Save