@vgroup/dialbox 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2233,10 +2233,10 @@ class DialboxComponent {
|
|
|
2233
2233
|
this.isInitialized = false;
|
|
2234
2234
|
this.isMinimised = false;
|
|
2235
2235
|
// Initialize if dialpad is visible by default
|
|
2236
|
-
if (!this.isDialpadHidden) {
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
}
|
|
2236
|
+
// if (!this.isDialpadHidden) {
|
|
2237
|
+
// console.log('sfsdfdsf')
|
|
2238
|
+
// this.initializeTwilio();
|
|
2239
|
+
// }
|
|
2240
2240
|
}
|
|
2241
2241
|
initializeTwilio() {
|
|
2242
2242
|
if (!this.isInitialized) {
|
|
@@ -2363,6 +2363,10 @@ class DialboxComponent {
|
|
|
2363
2363
|
ngOnInit() {
|
|
2364
2364
|
try {
|
|
2365
2365
|
this.token = localStorage.getItem('ext_token') || '';
|
|
2366
|
+
if (!this.isDialpadHidden) {
|
|
2367
|
+
console.log('sfsdfdsf');
|
|
2368
|
+
this.initializeTwilio();
|
|
2369
|
+
}
|
|
2366
2370
|
//this.isCallInProgress = true;
|
|
2367
2371
|
this.getContactList();
|
|
2368
2372
|
this.getUserCallSetting();
|
|
@@ -2448,7 +2452,7 @@ class DialboxComponent {
|
|
|
2448
2452
|
this.callData.isIncomingCall = true;
|
|
2449
2453
|
}
|
|
2450
2454
|
incomingCallData.on('cancel', () => {
|
|
2451
|
-
|
|
2455
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
2452
2456
|
if (this.incomingCallsList.length == 0) {
|
|
2453
2457
|
this.isCallInProgress = false;
|
|
2454
2458
|
}
|
|
@@ -2516,12 +2520,16 @@ class DialboxComponent {
|
|
|
2516
2520
|
this.callData.isIncomingCall = true;
|
|
2517
2521
|
}
|
|
2518
2522
|
this.incomingCallData.on('cancel', () => {
|
|
2519
|
-
|
|
2520
|
-
this.
|
|
2523
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2524
|
+
if (this.incomingCallsList.length == 0) {
|
|
2525
|
+
this.isCallInProgress = false;
|
|
2526
|
+
}
|
|
2521
2527
|
});
|
|
2522
2528
|
this.incomingCallData.on('disconnect', () => {
|
|
2523
|
-
|
|
2524
|
-
this.
|
|
2529
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2530
|
+
if (this.incomingCallsList.length == 0) {
|
|
2531
|
+
this.isCallInProgress = false;
|
|
2532
|
+
}
|
|
2525
2533
|
});
|
|
2526
2534
|
}
|
|
2527
2535
|
}
|