Add property to window

This commit is contained in:
Pierre HUBERT 2020-04-12 18:38:41 +02:00
parent a36d8b546a
commit 106744c7d8
2 changed files with 10 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class CallsController {
* @param {Conversation} conv Information about the target conversation * @param {Conversation} conv Information about the target conversation
*/ */
static Open(conv) { static Open(conv) {
if(OpenCalls.has(conv.ID) && OpenCalls.get(conv.ID).rootEl.isConnected) if(OpenCalls.has(conv.ID) && OpenCalls.get(conv.ID).isOpen)
return; return;
console.info("Open call for conversation " + conv.ID); console.info("Open call for conversation " + conv.ID);

View File

@ -119,6 +119,15 @@ class CallWindow extends CustomEvents {
} }
} }
/**
* Check if this conversation window is open or not
*
* @returns {boolean}
*/
get isOpen() {
return this.rootEl.isConnected
}
/** /**
* Make the call window draggable * Make the call window draggable
*/ */