@vgroup/dialbox 0.1.10 → 0.1.11

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
- console.log('sfsdfdsf');
2238
- this.initializeTwilio();
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();
@@ -2493,38 +2497,37 @@ class DialboxComponent {
2493
2497
  this.registerDragElement();
2494
2498
  }
2495
2499
  ngOnChanges(changes) {
2496
- if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
2497
- this.getContactList();
2498
- this.getUserCallSetting();
2499
- setTimeout(() => {
2500
- this.dialInputElement.nativeElement.focus();
2501
- }, 0);
2502
- if (this.incomingCallData) {
2503
- if (this.isCallInProgress) {
2504
- this.newIncomingCalls.push(this.incomingCallData);
2505
- console.log('404', this.incomingCallData);
2506
- this.getUserInformation(this.incomingCallData);
2507
- }
2508
- else {
2509
- this.isCallInProgress = true;
2510
- this.isDialpadHidden = false;
2511
- this.callData.phone = this.incomingCallData.parameters['From'];
2512
- console.log('411', this.incomingCallData);
2513
- this.getUserInformation(this.incomingCallData);
2514
- this.callData.name = this.incomingCallData.customParameters.get('name');
2515
- this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
2516
- this.callData.isIncomingCall = true;
2517
- }
2518
- this.incomingCallData.on('cancel', () => {
2519
- // this.incomingCallsList = [];
2520
- this.isCallInProgress = false;
2521
- });
2522
- this.incomingCallData.on('disconnect', () => {
2523
- // this.incomingCallsList = [];
2524
- this.isCallInProgress = false;
2525
- });
2526
- }
2527
- }
2500
+ // if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
2501
+ // this.getContactList();
2502
+ // this.getUserCallSetting();
2503
+ // setTimeout(() => {
2504
+ // this.dialInputElement.nativeElement.focus();
2505
+ // }, 0);
2506
+ // if(this.incomingCallData) {
2507
+ // if (this.isCallInProgress) {
2508
+ // this.newIncomingCalls.push(this.incomingCallData);
2509
+ // console.log('404', this.incomingCallData)
2510
+ // this.getUserInformation(this.incomingCallData);
2511
+ // } else {
2512
+ // this.isCallInProgress = true;
2513
+ // this.isDialpadHidden = false;
2514
+ // this.callData.phone = this.incomingCallData.parameters['From'];
2515
+ // console.log('411', this.incomingCallData)
2516
+ // this.getUserInformation(this.incomingCallData);
2517
+ // this.callData.name = this.incomingCallData.customParameters.get('name');
2518
+ // this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
2519
+ // this.callData.isIncomingCall = true;
2520
+ // }
2521
+ // this.incomingCallData.on('cancel', () => {
2522
+ // // this.incomingCallsList = [];
2523
+ // this.isCallInProgress = false;
2524
+ // });
2525
+ // this.incomingCallData.on('disconnect', () => {
2526
+ // // this.incomingCallsList = [];
2527
+ // this.isCallInProgress = false;
2528
+ // });
2529
+ // }
2530
+ // }
2528
2531
  }
2529
2532
  registerDragElement() {
2530
2533
  try {