mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 18:08:50 +00:00
Only allow one window per conversation
This commit is contained in:
parent
0f4d3042c3
commit
bbaaf3a5c2
@ -142,6 +142,10 @@ ComunicWeb.components.calls.controller = {
|
||||
*/
|
||||
open: function(call){
|
||||
|
||||
//Check if the call is already in the list of calls
|
||||
if(ComunicWeb.components.calls.currentList.isCallInList(call.id))
|
||||
return;
|
||||
|
||||
//Add the call to the list of opened calls
|
||||
ComunicWeb.components.calls.currentList.addCallToList(call.id);
|
||||
|
||||
|
@ -27,6 +27,15 @@ ComunicWeb.components.calls.currentList = {
|
||||
return string.split(",");
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if a call ID is in the list of opened calls
|
||||
*
|
||||
* @param {Number} id The ID of the call to check
|
||||
*/
|
||||
isCallInList: function(id){
|
||||
return this.getCurrentCallsList().includes(""+id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Save a new list of calls
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user