Skip to content

Commit

Permalink
Merge #844(kitsune): Only signal pending event as merged once the rea…
Browse files Browse the repository at this point in the history
…l one is in the timeline
  • Loading branch information
KitsuneRal authored Dec 9, 2024
2 parents 4c97d1d + 862c3ad commit ab1fde2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2793,9 +2793,9 @@ Room::Timeline::size_type Room::Private::mergePendingEvent(PendingEvents::iterat
// unsyncedEvents (see #286). Fortunately, unsyncedEvents only grows at
// its back so we can rely on the index staying valid at least.
localEchoIt = unsyncedEvents.begin() + pendingEvtIdx;
const auto insertedSize = moveEventsToTimeline({ remoteEchoIt, remoteEchoIt + 1 }, Newer);
localEchoIt->setMerged(*remoteEcho);
unsyncedEvents.erase(localEchoIt);
const auto insertedSize = moveEventsToTimeline({ remoteEchoIt, remoteEchoIt + 1 }, Newer);
if (insertedSize > 0)
q->onAddNewTimelineEvents(syncEdge() - insertedSize);

Expand Down

0 comments on commit ab1fde2

Please sign in to comment.