From 5b6e3d0902051333d93fb042790ce232fbee59d4 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 22 Nov 2021 19:36:16 +0000 Subject: [PATCH] Revert "Fix updating events when delegate choice changes" This reverts commit 7b7c659a3aff1db9c978aa1d2f7671ed38ac9430 --- src/messageeventmodel.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/messageeventmodel.cpp b/src/messageeventmodel.cpp index 324c4f537..512c172b4 100644 --- a/src/messageeventmodel.cpp +++ b/src/messageeventmodel.cpp @@ -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); } } }