timeline: remove trailing read markers

This commit is contained in:
Benjamin Bouvier
2024-07-10 14:54:26 +02:00
parent f96f55ccd9
commit 7d16ca54f4

View File

@@ -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;
}