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

RoomListViewModel: Track the index of the active room in the list #29519

Merged
merged 4 commits into from
Mar 18, 2025

Conversation

MidhunSureshR
Copy link
Member

  • Provides hook useIndexForActiveRoom(rooms) that returns the index of the currently active room in the room list.
  • Uses this hook in the vm and exposes the result for the view to use.

This hook simply keeps a state which tracks the index of the active room
in the list of rooms passed through props. This index will be recomputed
if the active rooms changes or if the list itself changed.
@MidhunSureshR MidhunSureshR added this pull request to the merge queue Mar 18, 2025
Merged via the queue into develop with commit 839329b Mar 18, 2025
38 checks passed
@MidhunSureshR MidhunSureshR deleted the midhun/rls/vm-active-room branch March 18, 2025 13:03
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