From 1ac443253a453610d3fc2856ad095e66043b18a3 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Mon, 5 Nov 2018 07:39:29 +0800 Subject: [PATCH] Reenable local echo. Move fast and break things. --- imports/Spectral/Component/Timeline/MessageDelegate.qml | 2 -- imports/Spectral/Panel/RoomPanelForm.ui.qml | 2 +- include/libqmatrixclient | 2 +- src/messageeventmodel.cpp | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/imports/Spectral/Component/Timeline/MessageDelegate.qml b/imports/Spectral/Component/Timeline/MessageDelegate.qml index da54a4a..fe4cb3c 100644 --- a/imports/Spectral/Component/Timeline/MessageDelegate.qml +++ b/imports/Spectral/Component/Timeline/MessageDelegate.qml @@ -8,8 +8,6 @@ import Spectral.Setting 0.1 import Spectral.Component 2.0 -import "qrc:/js/util.js" as Util - RowLayout { readonly property bool avatarVisible: !sentByMe && (aboveAuthor !== author || aboveSection !== section || aboveEventType === "state" || aboveEventType === "emote" || aboveEventType === "other") readonly property bool highlighted: !(sentByMe || eventType === "notice" ) diff --git a/imports/Spectral/Panel/RoomPanelForm.ui.qml b/imports/Spectral/Panel/RoomPanelForm.ui.qml index 1bf0f19..c970db7 100644 --- a/imports/Spectral/Panel/RoomPanelForm.ui.qml +++ b/imports/Spectral/Panel/RoomPanelForm.ui.qml @@ -139,7 +139,7 @@ Item { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter - visible: readMarker === true && index !== 0 + visible: readMarker === true Rectangle { Layout.fillWidth: true diff --git a/include/libqmatrixclient b/include/libqmatrixclient index a813835..be7d25e 160000 --- a/include/libqmatrixclient +++ b/include/libqmatrixclient @@ -1 +1 @@ -Subproject commit a81383549df4db8a487a847dca41900f3ab38c27 +Subproject commit be7d25ed22abd07a254bfb8ff6c30de4fcc79e6a diff --git a/src/messageeventmodel.cpp b/src/messageeventmodel.cpp index 0086c9c..60c277b 100644 --- a/src/messageeventmodel.cpp +++ b/src/messageeventmodel.cpp @@ -306,10 +306,10 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const { if (role == HighlightRole) return m_currentRoom->isEventHighlighted(&evt); - if (role == ReadMarkerRole) return evt.id() == lastReadEventId; + if (role == ReadMarkerRole) return evt.id() == lastReadEventId && row > timelineBaseIndex(); if (role == SpecialMarksRole) { - if (isPending) return EventStatus::Hidden; + if (isPending) return pendingIt->deliveryStatus(); if (is(evt)) return EventStatus::Hidden; if (evt.isRedacted()) return EventStatus::Redacted;