mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 23:25:20 +03:00
hide "reply" and "forward" when chatPermission is missing
"forward" is also hidden because this would need bigger changes regarding the state of the hasChatPermission variable inside the ChatController.kt Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
96721a2df6
commit
b603031011
2 changed files with 4 additions and 3 deletions
|
@ -587,7 +587,7 @@ class ChatController(args: Bundle) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context != null) {
|
if (context != null && hasChatPermission && !isReadOnlyConversation()) {
|
||||||
val messageSwipeController = MessageSwipeCallback(
|
val messageSwipeController = MessageSwipeCallback(
|
||||||
activity!!,
|
activity!!,
|
||||||
object : MessageSwipeActions {
|
object : MessageSwipeActions {
|
||||||
|
|
|
@ -74,7 +74,7 @@ class MessageActionsDialog(
|
||||||
|
|
||||||
initEmojiBar(hasChatPermission)
|
initEmojiBar(hasChatPermission)
|
||||||
initMenuItemCopy(!message.isDeleted)
|
initMenuItemCopy(!message.isDeleted)
|
||||||
initMenuReplyToMessage(message.replyable)
|
initMenuReplyToMessage(message.replyable && hasChatPermission)
|
||||||
initMenuReplyPrivately(
|
initMenuReplyPrivately(
|
||||||
message.replyable &&
|
message.replyable &&
|
||||||
hasUserId(user) &&
|
hasUserId(user) &&
|
||||||
|
@ -83,7 +83,8 @@ class MessageActionsDialog(
|
||||||
)
|
)
|
||||||
initMenuDeleteMessage(showMessageDeletionButton)
|
initMenuDeleteMessage(showMessageDeletionButton)
|
||||||
initMenuForwardMessage(
|
initMenuForwardMessage(
|
||||||
ChatMessage.MessageType.REGULAR_TEXT_MESSAGE == message.getMessageType() &&
|
hasChatPermission &&
|
||||||
|
ChatMessage.MessageType.REGULAR_TEXT_MESSAGE == message.getMessageType() &&
|
||||||
!(message.isDeletedCommentMessage || message.isDeleted)
|
!(message.isDeletedCommentMessage || message.isDeleted)
|
||||||
)
|
)
|
||||||
initMenuMarkAsUnread(
|
initMenuMarkAsUnread(
|
||||||
|
|
Loading…
Reference in a new issue