From f520f8ce16ad08583f7e711ce044e7c2f6278c62 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Fri, 15 Jan 2021 20:38:30 -0500 Subject: [PATCH] Display read receipts when read indicator is clicked --- resources/qml/StatusIndicator.qml | 6 ++++++ resources/qml/TimelineRow.qml | 1 + 2 files changed, 7 insertions(+) diff --git a/resources/qml/StatusIndicator.qml b/resources/qml/StatusIndicator.qml index 0b18b888..3beac649 100644 --- a/resources/qml/StatusIndicator.qml +++ b/resources/qml/StatusIndicator.qml @@ -6,6 +6,7 @@ Rectangle { id: indicator property int state: 0 + property string eventId color: "transparent" width: 16 @@ -31,6 +32,11 @@ Rectangle { anchors.fill: parent hoverEnabled: true + + onClicked: { + if (indicator.state == MtxEvent.Read) + TimelineManager.timeline.readReceiptsAction(indicator.eventId); + } } Image { diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index 57fded90..1eb07daa 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml @@ -70,6 +70,7 @@ Item { StatusIndicator { state: model.state + eventId: model.id Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 width: 16