Revert "Fix updating events when delegate choice changes"

This reverts commit 7b7c659a3a
This commit is contained in:
Tobias Fella
2021-11-22 19:36:16 +00:00
parent 5c5b805d3c
commit 5b6e3d0902

View File

@@ -353,11 +353,8 @@ void MessageEventModel::refreshLastUserEvents(int baseTimelineRow)
const auto limit = timelineBottom + std::min(baseTimelineRow + 10, m_currentRoom->timelineSize());
for (auto it = timelineBottom + std::max(baseTimelineRow - 10, 0); it != limit; ++it) {
if ((*it)->senderId() == lastSender) {
// See https://bugreports.qt.io/browse/QTBUG-84093
beginRemoveRows(QModelIndex(), it - timelineBottom, it - timelineBottom);
endRemoveRows();
beginInsertRows(QModelIndex(), it - timelineBottom, it - timelineBottom);
endInsertRows();
auto idx = index(it - timelineBottom);
Q_EMIT dataChanged(idx, idx);
}
}
}