From a1efa396548752fd2ff59dd2e27cbf7e37320a09 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 12 Apr 2020 16:16:42 +0200 Subject: [PATCH] Fix issue on page reload --- assets/js/components/calls/controller.js | 2 +- assets/js/components/calls/window.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/components/calls/controller.js b/assets/js/components/calls/controller.js index b67328fc..1515d6e0 100644 --- a/assets/js/components/calls/controller.js +++ b/assets/js/components/calls/controller.js @@ -17,7 +17,7 @@ class CallsController { * @param {Conversation} conv Information about the target conversation */ static Open(conv) { - if(OpenConversations.has(conv.ID)) + if(OpenConversations.has(conv.ID) && OpenConversations.get(conv.ID).rootEl.isConnected) return; console.info("Open call for conversation " + conv.ID); diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index a467f071..dacc1557 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -369,7 +369,7 @@ class CallWindow extends CustomEvents { this.mainPeer.on("close", () => { console.log("Connection to main peer was closed.") if(this.mainPeer) - this.Close(true); + this.Close(false); }); }