Make UI react instantly to hanging up but also wait for leave sound

This ensures that we don't see a mistaken 'reconnecting' toast while we're hanging up (and also that the leave sound gets a chance to play in widgets once again).
This commit is contained in:
Robin
2025-09-24 21:26:16 -04:00
parent edd3eb8747
commit 6cf020763e
3 changed files with 95 additions and 80 deletions

View File

@@ -151,7 +151,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
);
setVm(vm);
const sub = vm.left$.subscribe(props.onLeft);
const sub = vm.leave$.subscribe(props.onLeft);
return (): void => {
vm.destroy();
sub.unsubscribe();
@@ -798,7 +798,7 @@ export const InCallView: FC<InCallViewProps> = ({
<EndCallButton
key="end_call"
onClick={function (): void {
vm.leave();
vm.hangup();
}}
onTouchEnd={onControlsTouchEnd}
data-testid="incall_leave"