summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/MessageView.qml1
-rw-r--r--resources/qml/RoomList.qml2
-rw-r--r--resources/qml/TimelineRow.qml17
3 files changed, 19 insertions, 1 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml
index fd533229..2e1d9398 100644
--- a/resources/qml/MessageView.qml
+++ b/resources/qml/MessageView.qml
@@ -458,6 +458,7 @@ Item {
                 encryptionError: wrapper.encryptionError
                 timestamp: wrapper.timestamp
                 status: wrapper.status
+                index: wrapper.index
                 relatedEventCacheBuster: wrapper.relatedEventCacheBuster
                 y: section.visible && section.active ? section.y + section.height : 0
 
diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml
index 5ce69d97..a4628aa7 100644
--- a/resources/qml/RoomList.qml
+++ b/resources/qml/RoomList.qml
@@ -108,6 +108,8 @@ Page {
                     timelineRoot: timelineView
                     windowTarget: roomWindowW
                 }
+
+                onActiveChanged: { room.lastReadIdOnWindowFocus(); }
             }
 
         }
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index 3a7bf561..dc640099 100644
--- a/resources/qml/TimelineRow.qml
+++ b/resources/qml/TimelineRow.qml
@@ -44,12 +44,13 @@ AbstractButton {
     required property int duration
     required property var timestamp
     required property int status
+    required property int index
     required property int relatedEventCacheBuster
 
     hoverEnabled: true
 
     width: parent.width
-    height: row.height+(reactionRow.height > 0 ? reactionRow.height-2 : 0 )
+    height: row.height+(reactionRow.height > 0 ? reactionRow.height-2 : 0 )+unreadRow.height
 
     Rectangle {
         color: (Settings.messageHoverHighlight && hovered) ? Nheko.colors.alternateBase : "transparent"
@@ -277,6 +278,7 @@ AbstractButton {
             }
         }
     }
+
     Reactions {
         anchors {
             top: row.bottom
@@ -292,4 +294,17 @@ AbstractButton {
         reactions: r.reactions
         eventId: r.eventId
     }
+
+    Rectangle {
+        id: unreadRow
+        anchors {
+            top: reactionRow.bottom
+            topMargin: 5
+        }
+        color: Nheko.colors.highlight
+        width: row.maxWidth
+        visible: (r.index > 0 && (chat.model.fullyReadEventId == r.eventId))
+        height: visible ? 3 : 0
+
+    }
 }