mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 09:38:14 +03:00
hide reactions on deleted and command messages
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
973d13f902
commit
649d8831ac
2 changed files with 10 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue