From 9071cf827f604f59218f07835f41b8adba01c9f9 Mon Sep 17 00:00:00 2001 From: James Graham Date: Tue, 29 Aug 2023 17:41:20 +0100 Subject: [PATCH] Make sure that the event after a state event is also a state event before filtering it out. --- src/models/messagefiltermodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/messagefiltermodel.cpp b/src/models/messagefiltermodel.cpp index c95921a57..b8c0d4bec 100644 --- a/src/models/messagefiltermodel.cpp +++ b/src/models/messagefiltermodel.cpp @@ -57,7 +57,7 @@ bool MessageFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sour const bool previousEventIsState = sourceModel()->data(sourceModel()->index(sourceRow + 1, 0), MessageEventModel::DelegateTypeRole) == MessageEventModel::DelegateType::State; const bool newDay = sourceModel()->data(sourceModel()->index(sourceRow, 0), MessageEventModel::ShowSectionRole).toBool(); - if (notLastRow && previousEventIsState && !newDay) { + if (eventType == MessageEventModel::State && notLastRow && previousEventIsState && !newDay) { return false; }