mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-24 00:58:00 -04:00
ui: Improve logging for timeline resets
This commit is contained in:
committed by
Jonas Platte
parent
bfe79468c6
commit
932f12e76d
@@ -180,11 +180,16 @@ impl TimelineBuilder {
|
||||
let mut ignore_user_list_stream = client.subscribe_to_ignore_user_list_changes();
|
||||
let ignore_user_list_update_join_handle = spawn({
|
||||
let inner = inner.clone();
|
||||
|
||||
let span = info_span!(parent: Span::none(), "ignore_user_list_update_handler", room_id = ?room.room_id());
|
||||
span.follows_from(Span::current());
|
||||
|
||||
async move {
|
||||
while ignore_user_list_stream.next().await.is_some() {
|
||||
inner.clear().await;
|
||||
}
|
||||
}
|
||||
.instrument(span)
|
||||
});
|
||||
|
||||
// Not using room.add_event_handler here because RoomKey events are
|
||||
|
||||
@@ -649,8 +649,6 @@ impl TimelineInnerStateTransaction<'_> {
|
||||
}
|
||||
|
||||
fn clear(&mut self) {
|
||||
trace!("Clearing timeline");
|
||||
|
||||
// By first checking if there are any local echoes first, we do a bit
|
||||
// more work in case some are found, but it should be worth it because
|
||||
// there will often not be any, and only emitting a single
|
||||
@@ -686,6 +684,8 @@ impl TimelineInnerStateTransaction<'_> {
|
||||
self.fully_read_event = None;
|
||||
self.event_should_update_fully_read_marker = false;
|
||||
self.back_pagination_tokens.clear();
|
||||
|
||||
debug!(remaining_items = self.items.len(), "Timeline cleared");
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
|
||||
Reference in New Issue
Block a user