Fix small scope issue

pull/313/head
Nicolas Werner 4 years ago
parent 62651fab02
commit 7f2d18c36d
  1. 11
      resources/qml/TimelineView.qml

@ -57,7 +57,6 @@ Page {
property string eventId property string eventId
property int eventType property int eventType
property bool isEncrypted property bool isEncrypted
property var room: TimelineManager.timeline
function show(eventId_, eventType_, isEncrypted_, showAt_, position) { function show(eventId_, eventType_, isEncrypted_, showAt_, position) {
eventId = eventId_; eventId = eventId_;
@ -78,12 +77,12 @@ Page {
MenuItem { MenuItem {
text: qsTr("Reply") text: qsTr("Reply")
onClicked: room.replyAction(messageContextMenu.eventId) onClicked: TimelineManager.timeline.replyAction(messageContextMenu.eventId)
} }
MenuItem { MenuItem {
text: qsTr("Read receipts") text: qsTr("Read receipts")
onTriggered: room.readReceiptsAction(messageContextMenu.eventId) onTriggered: TimelineManager.timeline.readReceiptsAction(messageContextMenu.eventId)
} }
MenuItem { MenuItem {
@ -92,19 +91,19 @@ Page {
MenuItem { MenuItem {
text: qsTr("View raw message") text: qsTr("View raw message")
onTriggered: room.viewRawMessage(messageContextMenu.eventId) onTriggered: TimelineManager.timeline.viewRawMessage(messageContextMenu.eventId)
} }
MenuItem { MenuItem {
visible: messageContextMenu.isEncrypted visible: messageContextMenu.isEncrypted
height: visible ? implicitHeight : 0 height: visible ? implicitHeight : 0
text: qsTr("View decrypted raw message") text: qsTr("View decrypted raw message")
onTriggered: room.viewDecryptedRawMessage(messageContextMenu.eventId) onTriggered: TimelineManager.timeline.viewDecryptedRawMessage(messageContextMenu.eventId)
} }
MenuItem { MenuItem {
text: qsTr("Redact message") text: qsTr("Redact message")
onTriggered: room.redactEvent(messageContextMenu.eventId) onTriggered: TimelineManager.timeline.redactEvent(messageContextMenu.eventId)
} }
MenuItem { MenuItem {

Loading…
Cancel
Save