Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Feb 5, 2024

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.


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.
@Hywan Hywan requested a review from a team as a code owner February 5, 2024 10:01
@Hywan Hywan requested review from poljar and removed request for a team February 5, 2024 10:01
Copy link
Contributor

@poljar poljar left a 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() {
Copy link
Contributor

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.

Copy link
Member Author

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.

@Hywan Hywan self-assigned this Apr 25, 2024
@Hywan Hywan closed this Nov 5, 2024
@Hywan
Copy link
Member Author

Hywan commented Nov 5, 2024

To be reopened once we have persistent storage inside the even cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants