mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-24 00:58:00 -04:00
ui: Add logging for send-event cancellation
This commit is contained in:
committed by
Jonas Platte
parent
932f12e76d
commit
246a128ec3
@@ -578,8 +578,10 @@ impl<P: RoomDataProvider> TimelineInner<P> {
|
||||
rfind_event_item(&state.items, |it| it.transaction_id() == Some(txn_id))
|
||||
{
|
||||
state.items.remove(idx);
|
||||
debug!("Discarded local echo");
|
||||
true
|
||||
} else {
|
||||
debug!("Can't find local echo to discard");
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,6 +604,7 @@ impl Timeline {
|
||||
/// state of `SendState::NotYetSent` might be supported in the future as
|
||||
/// well, but there can be no guarantee for that actually stopping the
|
||||
/// event from reaching the server.
|
||||
#[instrument(skip(self))]
|
||||
pub async fn cancel_send(&self, txn_id: &TransactionId) -> bool {
|
||||
self.inner.discard_local_echo(txn_id).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user