Ongoing call tiles - Implement the view-models and store#34198
Open
MidhunSureshR wants to merge 11 commits into
Open
Ongoing call tiles - Implement the view-models and store#34198MidhunSureshR wants to merge 11 commits into
MidhunSureshR wants to merge 11 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched from #34197
This PR implements the view-models necessary for driving the views. There's no foolproof way to associate a given call to a rtc notification event (which is what we render as tiles) so the basic idea is to treat the last notification tile in the timeline as an ongoing call tile if there's a call in the room.
BaseOngoingCallTileViewModelthat provides the shared snapshot content.DmOngoingCallTileViewModelandRoomOngoingCallTileViewModelboth extend this base view model to provide the part of the snapshot that is not common.FacePileViewModel,MemberAvatarViewModelandDurationViewModelfor driving the views from the last PR.LatestRtcNotificationEventStore, that tracks the latest notification event in a given room. This is necessary because the call store tells you about a new call as soon as a call membership event comes through but the timeline only renders rtc notification events. The problem arises when there's a delay between receiving the call membership event and the notification event. As a result,CallStoretells us that a call is ongoing in the room but the corresponding rtc notification event hasn't arrived, so we incorrectly show the last call tile (which in reality relates to a call that is already over) as ongoing.