From a43786674b0806d573d89fa8920e743098a36add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Thu, 9 Oct 2025 08:47:14 +0200 Subject: [PATCH] chore: Follow up forward displayPendingEvent when using Room.sendTextEvent() or Room.sendFileEvent() --- lib/src/room.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/src/room.dart b/lib/src/room.dart index 861db5da..76d72a40 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -711,6 +711,12 @@ class Room { String? threadLastEventId, StringBuffer? commandStdout, bool addMentions = true, + + /// Displays an event in the timeline with the transaction ID as the event + /// ID and a status of SENDING, SENT or ERROR until it gets replaced by + /// the sync event. Using this can display a different sort order of events + /// as the sync event does replace but not relocate the pending event. + bool displayPendingEvent = true, }) { if (parseCommands) { return client.parseAndRunCommand( @@ -784,6 +790,7 @@ class Room { editEventId: editEventId, threadRootEventId: threadRootEventId, threadLastEventId: threadLastEventId, + displayPendingEvent: displayPendingEvent, ); } @@ -838,6 +845,12 @@ class Room { Map? extraContent, String? threadRootEventId, String? threadLastEventId, + + /// Displays an event in the timeline with the transaction ID as the event + /// ID and a status of SENDING, SENT or ERROR until it gets replaced by + /// the sync event. Using this can display a different sort order of events + /// as the sync event does replace but not relocate the pending event. + bool displayPendingEvent = true, }) async { txid ??= client.generateUniqueTransactionId(); sendingFilePlaceholders[txid] = file; @@ -1035,6 +1048,7 @@ class Room { editEventId: editEventId, threadRootEventId: threadRootEventId, threadLastEventId: threadLastEventId, + displayPendingEvent: displayPendingEvent, ); sendingFilePlaceholders.remove(txid); sendingFileThumbnails.remove(txid);