-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sdk): Remove FrozenSlidingSyncRoom::timeline
#3092
Conversation
This patch removes `FrozenSlidingSyncRoom::timeline`, which means we no longer cache on-disk the latest events (up to 10). This feature will be back in a cleaner way with `matrix_sdk_ui::event_graph`. Because `FrozenSlidingSyncRoom::timeline` is removed, we can also remove `SlidingSyncRoom::prev_batch`! It was stored here only to handle this `timeline_queue` when restored back from the cache. The `prev_batch` is already stored correctly in `RoomInfo`, no need to store it here anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, left a comment and maybe it would be wise to pester someone to test it, just in case.
|
||
assert_eq!(room.room_id(), room_id); | ||
} | ||
|
||
#[async_test] | ||
async fn test_prev_batch() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we convert this test to the new field? I'm not sure that we have test for the prev_batch
in the sliding sync case otherwise.
Ignore me if we do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm we don't have tests in matrix_sdk_base::sliding_sync
for that indeed. I'll write them.
To be reopened once we have persistent storage inside the even cache. |
This patch removes
FrozenSlidingSyncRoom::timeline
, which means we nolonger cache on-disk the latest events (up to 10). This feature will be
back in a cleaner way with
matrix_sdk_ui::event_graph
.Because
FrozenSlidingSyncRoom::timeline
is removed, we can also removeSlidingSyncRoom::prev_batch
! It was stored here only to handle thistimeline_queue
when restored back from the cache. Theprev_batch
is already stored correctly in
RoomInfo
, no need to store it hereanymore.
SlidingSyncRoom
tech debt #3079