hide reactions on deleted and command messages

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-05-09 13:39:39 +02:00
parent 973d13f902
commit 649d8831ac
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 10 additions and 1 deletions

View file

@ -617,6 +617,14 @@ public class ChatMessage implements MessageContentType, MessageContentType.Image
return "voice-message".equals(messageType);
}
public boolean isCommandMessage() {
return "command".equals(messageType);
}
public boolean isDeletedCommentMessage() {
return "comment_deleted".equals(messageType);
}
public enum MessageType {
REGULAR_TEXT_MESSAGE,
SYSTEM_MESSAGE,

View file

@ -153,7 +153,8 @@ class MessageActionsDialog(
private fun initEmojiBar() {
if (CapabilitiesUtil.hasSpreedFeatureCapability(user, "reactions") &&
Conversation.ConversationReadOnlyState.CONVERSATION_READ_ONLY !=
currentConversation?.conversationReadOnlyState
currentConversation?.conversationReadOnlyState &&
!(message.isCommandMessage || message.isDeletedCommentMessage || message.isDeleted)
) {
checkAndSetEmojiSelfReaction(dialogMessageActionsBinding.emojiThumbsUp)
dialogMessageActionsBinding.emojiThumbsUp.setOnClickListener {