Skip to content

RoomListViewModel: Make the active room sticky in the list #29551

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

Merged
merged 4 commits into from
Mar 21, 2025

Conversation

MidhunSureshR
Copy link
Member

  • useIndexForActiveRoom is replaced by useStickyRoomList which like before provides the index of the active room in the list. But unlike before, this hook also returns an array of rooms such that the active room is retained in its old index even when the order of rooms in the list changes.
  • Use this new hook in the room list vm.

This hook takes the filtered, sorted rooms and returns a new list of
rooms such that the active room is kept in the same index even when the
list has changes.
@MidhunSureshR MidhunSureshR enabled auto-merge March 21, 2025 12:01
@MidhunSureshR MidhunSureshR added this pull request to the merge queue Mar 21, 2025
Merged via the queue into develop with commit b541228 Mar 21, 2025
32 checks passed
@MidhunSureshR MidhunSureshR deleted the midhun/rls/vm-sticky-room branch March 21, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants