mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-08 16:04:13 -04:00
fix(sdk): Rename SlidingSyncList.set_ranges to ranges.
This patch renames `SlidingSyncList.set_ranges` to `ranges` so that it matches the same terminology of the `SlidingSyncListBuilder` with `ranges`, `set_range`, `add_range` and `reset_ranges`. Consistency is important here.
This commit is contained in:
@@ -149,7 +149,7 @@ impl SlidingSyncList {
|
||||
///
|
||||
/// Remember to cancel the existing stream and fetch a new one as this will
|
||||
/// only be applied on the next request.
|
||||
pub fn set_ranges(&self, range: Vec<(u32, u32)>) -> &Self {
|
||||
pub fn ranges(&self, range: Vec<(u32, u32)>) -> &Self {
|
||||
let value = range.into_iter().map(|(a, b)| (a.into(), b.into())).collect();
|
||||
Observable::set(&mut self.ranges.write().unwrap(), value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user