File tree 1 file changed +3
-5
lines changed
crates/matrix-sdk/src/event_cache/room
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -920,10 +920,6 @@ mod private {
920
920
921
921
let chunk_content = new_first_chunk. content . clone ( ) ;
922
922
923
- // We've reached the start on disk, if and only if, there was no chunk prior to
924
- // the one we just loaded.
925
- let reached_start = new_first_chunk. previous . is_none ( ) ;
926
-
927
923
if let Err ( err) = self . events . insert_new_chunk_as_first ( new_first_chunk) {
928
924
error ! ( "error when inserting the previous chunk into its linked chunk: {err}" ) ;
929
925
@@ -949,7 +945,9 @@ mod private {
949
945
ChunkContent :: Items ( events) => LoadMoreEventsBackwardsOutcome :: Events {
950
946
events,
951
947
timeline_event_diffs,
952
- reached_start,
948
+ // We've reached the start on disk, if and only if, there was no chunk prior to
949
+ // the one we just loaded.
950
+ reached_start : self . events . chunks ( ) . next ( ) . unwrap ( ) . lazy_previous ( ) . is_none ( ) ,
953
951
} ,
954
952
} )
955
953
}
You can’t perform that action at this time.
0 commit comments