From a21d0c3eb075cf97a6acf51997519a101bec3a75 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Sat, 28 Dec 2019 17:00:39 +0800 Subject: [PATCH] Fix edited messages. --- include/libQuotient | 2 +- src/messageeventmodel.cpp | 2 +- src/spectralroom.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libQuotient b/include/libQuotient index 04960510d..16d670095 160000 --- a/include/libQuotient +++ b/include/libQuotient @@ -1 +1 @@ -Subproject commit 04960510df6058b4f25d3c41001a519e9fc5ba4a +Subproject commit 16d6700950f5f0ebd71481efd5e1a24f04e3c651 diff --git a/src/messageeventmodel.cpp b/src/messageeventmodel.cpp index 7e05151a9..b023f44fc 100644 --- a/src/messageeventmodel.cpp +++ b/src/messageeventmodel.cpp @@ -401,7 +401,7 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const { return EventStatus::Hidden; if (auto e = eventCast(&evt)) { - if (!e->replacedEvent().isEmpty()) { + if (!e->replacedEvent().isEmpty() && e->replacedEvent() != e->id()) { return EventStatus::Hidden; } } diff --git a/src/spectralroom.cpp b/src/spectralroom.cpp index 40ed9b92c..660452215 100644 --- a/src/spectralroom.cpp +++ b/src/spectralroom.cpp @@ -105,7 +105,7 @@ QString SpectralRoom::lastEvent() const { continue; if (auto e = eventCast(evt)) { - if (!e->replacedEvent().isEmpty()) { + if (!e->replacedEvent().isEmpty() && e->replacedEvent() != e->id()) { continue; } }