diff --git a/crates/matrix-sdk-ui/src/timeline/inner/state.rs b/crates/matrix-sdk-ui/src/timeline/inner/state.rs index 949610a6e..2e5cf85e6 100644 --- a/crates/matrix-sdk-ui/src/timeline/inner/state.rs +++ b/crates/matrix-sdk-ui/src/timeline/inner/state.rs @@ -876,7 +876,11 @@ impl TimelineInnerMetadata { (Some(from), Some(to)) => { if from >= to { - // The read marker can't move backwards. Keep the current one. + // The read marker can't move backwards. + if from + 1 == items.len() { + // The read marker has nothing after it. An item disappeared; remove it. + items.remove(from); + } self.has_up_to_date_read_marker_item = true; return; }