diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-05-02 18:01:18 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-05-02 18:06:56 +0200 |
commit | ab0baf5d9eb3319f8d3da15bd966ab8ab2810fce (patch) | |
tree | cba4d1153ec3e8573e8a6821d3e6b07d771fdccd /resources/qml/MessageInput.qml | |
parent | Fix crash when you have no rooms and open the global user profile (diff) | |
download | nheko-ab0baf5d9eb3319f8d3da15bd966ab8ab2810fce.tar.xz |
Only show actions, when you have permissions to do them
Diffstat (limited to 'resources/qml/MessageInput.qml')
-rw-r--r-- | resources/qml/MessageInput.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index 5bb699dd..c5dfbfa3 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -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 + } + } |