Skip to content

Commit

Permalink
fix(event cache): keep the previous-batch token when we haven't enabl…
Browse files Browse the repository at this point in the history
…ed storage
  • Loading branch information
bnjbvr committed Jan 9, 2025
1 parent 9e97ed3 commit 9023340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/matrix-sdk/src/event_cache/room/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ impl RoomEventCacheInner {
// Only keep the previous-batch token if we have a limited timeline; otherwise,
// we know about all the events, and we don't need to back-paginate,
// so we wouldn't make use of the given previous-batch token.
let prev_batch = if timeline.limited { timeline.prev_batch } else { None };
let prev_batch =
if !has_storage || timeline.limited { timeline.prev_batch } else { None };

self.append_new_events(
timeline.events,
Expand Down

0 comments on commit 9023340

Please sign in to comment.