Fix reactions sometimes not showing up

We need to adjust for the readmarker in the model
This commit is contained in:
Tobias Fella
2022-11-06 17:38:55 +01:00
parent 42cd470e15
commit c03b69cd17

View File

@@ -296,6 +296,9 @@ int MessageEventModel::refreshEventRoles(const QString &id, const QVector<int> &
return -1;
}
row = int(timelineIt - m_currentRoom->messageEvents().rbegin()) + timelineBaseIndex();
if (data(index(row, 0), EventTypeRole).toInt() == ReadMarker || data(index(row, 0), EventTypeRole).toInt() == Other) {
row++;
}
}
refreshEventRoles(row, roles);
return row;