From 5155f825bb71fca649a97ac4a7fa356cf85ee722 Mon Sep 17 00:00:00 2001 From: Arnav Rawat Date: Thu, 11 Mar 2021 18:33:54 -0600 Subject: historyedge() a result of findInTimeline() --- lib/room.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/room.cpp b/lib/room.cpp index 4f7f7ca9..ed07868b 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -562,8 +562,11 @@ QList Room::pinnedEvents() const QStringList events = d->getCurrentState()->pinnedEvents(); QList pinnedEvents; QStringList::iterator i; - for (i = events.begin(); i != events.end(); ++i) - pinnedEvents.append(findInTimeline(*i)->event()); + for (i = events.begin(); i != events.end(); ++i) { + auto timelineItem = findInTimeline(*i); + if (timelineItem != historyEdge()) + pinnedEvents.append(timelineItem->event()); + } return pinnedEvents; } -- cgit v1.2.3