From 7e03ca43595d1e9f8fa1743d4072d719a2cdfffa Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Fri, 3 Nov 2017 14:25:01 +0200 Subject: [PATCH] Reset the sender's name when paginating backwards The first message of the timeline would have an avatar and the rest of the messages would use the previous to be configured (whether or not should have an avatar). fixes #63 --- src/TimelineView.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TimelineView.cc b/src/TimelineView.cc index 354a725c..e5cbbbf6 100644 --- a/src/TimelineView.cc +++ b/src/TimelineView.cc @@ -179,6 +179,10 @@ TimelineView::addBackwardsEvents(const QString &room_id, const RoomMessages &msg isTimelineFinished = false; QList items; + // Reset the sender of the first message in the timeline + // cause we're about to insert a new one. + firstSender_.clear(); + // Parse in reverse order to determine where we should not show sender's // name. auto ii = msgs.chunk().size();