Skip to content

Commit

Permalink
It is useful to have a reference to the event when the pendingEventAd…
Browse files Browse the repository at this point in the history
…ded signal is called for Neochat and it's MessageEventModels as it's desirable to react after the event has been added to the unsyncedEvents so it can be searched.
  • Loading branch information
nvrWhere committed Oct 22, 2024
1 parent 6175147 commit efd53bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ Room::PendingEvents::iterator Room::Private::addAsPending(RoomEventPtr&& event)
event->setSender(connection->userId());
emit q->pendingEventAboutToAdd(std::to_address(event));
auto it = unsyncedEvents.emplace(unsyncedEvents.end(), std::move(event));
emit q->pendingEventAdded();
emit q->pendingEventAdded(std::to_address(event));
return it;
}

Expand Down
2 changes: 1 addition & 1 deletion Quotient/room.h
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ public Q_SLOTS:
/// The event is about to be appended to the list of pending events
void pendingEventAboutToAdd(Quotient::RoomEvent* event);
/// An event has been appended to the list of pending events
void pendingEventAdded();
void pendingEventAdded(Quotient::RoomEvent* event);
/// The remote echo has arrived with the sync and will be merged
/// with its local counterpart
/** NB: Requires a sync loop to be emitted */
Expand Down

0 comments on commit efd53bd

Please sign in to comment.