Make sure that the event after a state event is also a state event before filtering it out.

This commit is contained in:
James Graham
2023-08-29 17:41:20 +01:00
parent c7deaaba84
commit 9071cf827f

View File

@@ -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;
}