Skip to content

Move one-on-one layout into CallViewModel#3567

Merged
toger5 merged 3 commits intovoip-team/call-viewmodel-refactorfrom
toger5/move-oneonone-into-callViewModel
Nov 17, 2025
Merged

Move one-on-one layout into CallViewModel#3567
toger5 merged 3 commits intovoip-team/call-viewmodel-refactorfrom
toger5/move-oneonone-into-callViewModel

Conversation

@toger5
Copy link
Copy Markdown
Contributor

@toger5 toger5 commented Nov 17, 2025

as for our goal to now work with actual PR's on this branch

This moves another bit of logic in the view into the CallViewModel.

It also fixes a bug where we featched all members but are only interested about joined members. (and invited members for the sake of determining if its a one-on-one call.

@toger5 toger5 requested a review from a team as a code owner November 17, 2025 09:17
@toger5 toger5 requested review from BillCarsonFr and removed request for a team November 17, 2025 09:17
@toger5 toger5 changed the title Move on-on-one layout into CallViewModel Move one-on-one layout into CallViewModel Nov 17, 2025
Comment on lines +265 to +266
const localUserIsAlone = useBehavior(vm.localUserIsAlone$);
const oneOnOneMember = useBehavior(vm.isOneOnOneWith$);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Better naming or comment

  • oneOnOneMember -> "dm"sth.
  • local user Alone -> make sure its clear its session state (not room state)

const isOneOnOne = roomOthers.length === 1 && otherMember;
const text = isOneOnOne
? `Waiting for ${otherMember.name ?? otherMember.userId} to join…`
if (callPickupState !== "ringing" || localUserIsAlone) return null;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Add a comment that this still is not high level enough for the view?

/**
* Returns the Member {userId, getMxcAvatarUrl, rawDisplayName} of the other user in the call, if it's a one-on-one call.
*/
public isOneOnOneWith$ = this.scope.behavior(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Change this whole logic to be beased on isDM

Copy link
Copy Markdown
Member

@BillCarsonFr BillCarsonFr left a comment

Choose a reason for hiding this comment

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

Reviewed in watercooler.
could add some comments on the new isOneOne/IsAlone. This is not yet a snapshot as there is still some logic, but it's an improvement

@toger5 toger5 merged commit b51df36 into voip-team/call-viewmodel-refactor Nov 17, 2025
18 of 19 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