[network/neochat/release/26.08] src/timeline/models: Don't refresh user events right after adding them
Joshua Goins <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 54c4d1e59b4d9cb027dbed8dae78087b0db0a151 by Joshua Goins.
Committed on 24/07/2026 at 20:14.
Pushed by redstrate into branch 'release/26.08'.
Don't refresh user events right after adding them
I'm not sure what the point of this is, but it's expensive enough to
show up in Hotspot and I don't notice any obvious adverse effects.
(cherry picked from commit 30552ee28b31f6b0bbb08734059bfbee33f112fb)
M +0 -3 src/timeline/models/timelinemessagemodel.cpp
https://invent.kde.org/network/neochat/-/commit/54c4d1e59b4d9cb027dbed8dae78087b0db0a151
diff --git a/src/timeline/models/timelinemessagemodel.cpp b/src/timeline/models/timelinemessagemodel.cpp
index 7768ed432..a3cee6ed8 100644
--- a/src/timeline/models/timelinemessagemodel.cpp
+++ b/src/timeline/models/timelinemessagemodel.cpp
@@ -59,9 +59,6 @@ void TimelineMessageModel::connectNewRoom()
auto rowBelowInserted = m_room->maxTimelineIndex() - newest + timelineServerIndex() - 1;
refreshEventRoles(rowBelowInserted, {ContentModelRole});
}
- for (auto i = m_room->maxTimelineIndex() - newest; i <= m_room->maxTimelineIndex() - oldest; ++i) {
- refreshLastUserEvents(i);
- }
});
connect(m_room, &Room::pendingEventAdded, this, [this](const Quotient::RoomEvent *event) {
Q_EMIT newEventAdded(event);