mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-05 14:35:20 -04:00
Before this patch, `SlidingSyncView` has the following fields that were public: `state`, `rooms_list` and `rooms_count`. Since they are `Mutable`, they can be changed from the outside, and then will break the internal state of the view. This problem is mentioned in https://github.com/matrix-org/matrix-rust-sdk/ issues/1474. This patch solves this by making them prviate. Phew. That was simple! But wait, we have a problem now. `matrix-sdk-ffi` was relying on them. So this patch adds “helpers” methods on `SlidingSyncView`, like `state_stream`, `rooms_list`, `rooms_list_stream`, `rooms_count` and `rooms_count_stream`. Let's add new ones when it's necessary.