Only show actions, when you have permissions to do them

This commit is contained in:
Nicolas Werner 2021-05-02 18:01:18 +02:00
parent 1321d9bcca
commit ab0baf5d9e
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
15 changed files with 272 additions and 22 deletions

View file

@ -28,6 +28,7 @@ Rectangle {
RowLayout {
id: row
visible: (TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage) : false) || messageContextMenu.isSender
anchors.fill: parent
ImageButton {
@ -352,4 +353,11 @@ Rectangle {
}
Text {
anchors.centerIn: parent
visible: TimelineManager.timeline ? (!TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage)) : false
text: qsTr("You don't have permission to send messages in this room")
color: colors.text
}
}