From b7b871917122c3e0f5c23b83ea2d46d0fcbf8f39 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:28:35 +0100 Subject: [PATCH] Update src/stores/RoomViewStore.tsx Co-authored-by: Florian D --- src/stores/RoomViewStore.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index 207c966376..28ee2e47df 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -356,10 +356,8 @@ export class RoomViewStore extends EventEmitter { // Start a call if requested const currentRoomCall = this.state.roomId ? CallStore.instance.getCall(this.state.roomId) : null; - if (payload.view_call && room) { - if (!currentRoomCall) { - ElementCall.create(room, false); - } + if (payload.view_call && room && !currentRoomCall) { + ElementCall.create(room, false); } // Destroy the call when leaving call view const prevRoomCall = this.state.roomId ? CallStore.instance.getCall(this.state.roomId) : null;