summary refs log tree commit diff
path: root/resources/qml/TimelineView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/TimelineView.qml')
-rw-r--r--resources/qml/TimelineView.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 4b3c006a..b0880493 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -66,11 +66,13 @@ Page {
         property string eventId
         property int eventType
         property bool isEncrypted
+        property bool isEditable
 
-        function show(eventId_, eventType_, isEncrypted_, showAt_, position) {
+        function show(eventId_, eventType_, isEncrypted_, isEditable_, showAt_, position) {
             eventId = eventId_;
             eventType = eventType_;
             isEncrypted = isEncrypted_;
+            isEditable = isEditable_;
             if (position)
                 popup(position, showAt_);
             else
@@ -92,6 +94,8 @@ Page {
         }
 
         MenuItem {
+            visible: messageContextMenu.isEditable
+            height: visible ? implicitHeight : 0
             text: qsTr("Edit")
             onClicked: TimelineManager.timeline.editAction(messageContextMenu.eventId)
         }