Update src/stores/RoomViewStore.tsx

Co-authored-by: Florian D <florianduros@element.io>
This commit is contained in:
Timo
2025-02-11 11:28:35 +01:00
committed by GitHub
parent 2135918d02
commit b7b8719171

View File

@@ -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;