summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-01-15 20:38:30 -0500
committerLoren Burkholder <computersemiexpert@outlook.com>2021-01-15 20:46:43 -0500
commitf520f8ce16ad08583f7e711ce044e7c2f6278c62 (patch)
tree006526ac1a15d6fe217ed398d58383429ad7e625 /resources
parentRemove unused file (diff)
downloadnheko-f520f8ce16ad08583f7e711ce044e7c2f6278c62.tar.xz
Display read receipts when read indicator is clicked
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/StatusIndicator.qml6
-rw-r--r--resources/qml/TimelineRow.qml1
2 files changed, 7 insertions, 0 deletions
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