mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 21:15:30 +03:00
hide reactions from menu if conversation is read-only
Fixes #1956 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
bc0b4143e7
commit
572a212fc1
1 changed files with 5 additions and 3 deletions
|
@ -89,8 +89,6 @@ class MessageActionsDialog(
|
|||
ChatMessage.MessageType.SYSTEM_MESSAGE != message.getMessageType() &&
|
||||
BuildConfig.DEBUG
|
||||
)
|
||||
|
||||
initEmojiMore()
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
|
@ -153,7 +151,10 @@ class MessageActionsDialog(
|
|||
}
|
||||
|
||||
private fun initEmojiBar() {
|
||||
if (CapabilitiesUtil.hasSpreedFeatureCapability(user, "reactions")) {
|
||||
if (CapabilitiesUtil.hasSpreedFeatureCapability(user, "reactions") &&
|
||||
Conversation.ConversationReadOnlyState.CONVERSATION_READ_ONLY !=
|
||||
currentConversation?.conversationReadOnlyState
|
||||
) {
|
||||
checkAndSetEmojiSelfReaction(dialogMessageActionsBinding.emojiThumbsUp)
|
||||
dialogMessageActionsBinding.emojiThumbsUp.setOnClickListener {
|
||||
sendReaction(message, dialogMessageActionsBinding.emojiThumbsUp.text.toString())
|
||||
|
@ -182,6 +183,7 @@ class MessageActionsDialog(
|
|||
dialogMessageActionsBinding.emojiMore.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
initEmojiMore()
|
||||
dialogMessageActionsBinding.emojiBar.visibility = View.VISIBLE
|
||||
} else {
|
||||
dialogMessageActionsBinding.emojiBar.visibility = View.GONE
|
||||
|
|
Loading…
Reference in a new issue