Skip to content

Conversation

@Hywan
Copy link
Member

@Hywan Hywan commented Jan 9, 2026

Build on top of #6009.

This patch adds two methods on SlidingSync: unsubscribe_to_rooms and clear_and_subscribe_to_rooms to respectively remove many room subscriptions, and to replace room subscriptions by new ones

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 99.00990% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.93%. Comparing base (6c067a7) to head (4773977).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/sliding_sync/mod.rs 98.95% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6012      +/-   ##
==========================================
- Coverage   88.93%   88.93%   -0.01%     
==========================================
  Files         357      357              
  Lines       99018    99111      +93     
  Branches    99018    99111      +93     
==========================================
+ Hits        88062    88143      +81     
- Misses       6981     6988       +7     
- Partials     3975     3980       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 9, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing Hywan:feat-sdk-sliding-sync-room-unsubscriptions (4773977) with main (6c067a7)

Summary

✅ 50 untouched benchmarks

@Hywan Hywan force-pushed the feat-sdk-sliding-sync-room-unsubscriptions branch from b919900 to 48e7f03 Compare January 9, 2026 10:26
@Hywan Hywan marked this pull request as ready for review January 9, 2026 10:27
@Hywan Hywan requested a review from a team as a code owner January 9, 2026 10:27
@Hywan Hywan requested review from jmartinesp and poljar and removed request for a team and poljar January 9, 2026 10:27
Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code LGTM and works really well when tested in Element X Android, thanks!

Hywan added 3 commits January 9, 2026 15:30
…ms`.

This patch adds two methods on `SlidingSync`: `unsubscribe_to_rooms`
and `clear_and_subscribe_to_rooms` to respectively remove many room
subscriptions, and to replace room subscriptions by new ones.
…tions.

This patch changes `subscribe_to_rooms` in `RoomListService` to replace
the old subscriptions. It avoids accumulating subscriptions forever and
is closer to the old `visible_rooms` sliding sync list behaviour.
@Hywan Hywan force-pushed the feat-sdk-sliding-sync-room-unsubscriptions branch from d3f9eca to 4773977 Compare January 9, 2026 14:31
@Hywan Hywan enabled auto-merge (rebase) January 9, 2026 14:32
@Hywan Hywan merged commit 7b16a32 into matrix-org:main Jan 9, 2026
52 checks passed
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