Commit b656e29d authored by Muhammadali's avatar Muhammadali

update-

parent 8ae9e371
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "4.6.3", "version": "4.6.4",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -23,7 +23,7 @@ const CallHistoryInputDropdown = ({ ...@@ -23,7 +23,7 @@ const CallHistoryInputDropdown = ({
if (numberSelectHistory == 0 || numberSelectHistory == 'zero') { if (numberSelectHistory == 0 || numberSelectHistory == 'zero') {
elem.scrollTop = elem.scrollHeight; elem.scrollTop = elem.scrollHeight;
} else { } else {
elem.scrollTop = elem.scrollHeight - numberSelectHistory * 50; elem.scrollTop = elem.scrollHeight - numberSelectHistory * 55;
} }
} }
}, [numberSelectHistory]); }, [numberSelectHistory]);
......
...@@ -216,7 +216,7 @@ export class BoxDialer { ...@@ -216,7 +216,7 @@ export class BoxDialer {
callType: '', callType: '',
}, },
}); });
BX?.localStorage?.remove('viExternalCard'); this.removeViExternalCard();
}, },
confirmed: (e) => { confirmed: (e) => {
console.log('%c confirmed', 'font-size: 22px; color: green;', e); console.log('%c confirmed', 'font-size: 22px; color: green;', e);
...@@ -240,6 +240,20 @@ export class BoxDialer { ...@@ -240,6 +240,20 @@ export class BoxDialer {
}; };
} }
removeViExternalCard() {
if (
typeof BX !== 'undefined' &&
window.localStorage.getItem(BX.bitrix_sessid() + '_mycall') &&
window.localStorage.getItem('mycall')
) {
BX?.localStorage?.remove('viExternalCard');
} else if (typeof BX !== 'undefined') {
BX?.localStorage?.remove('viExternalCard');
}
}
startTimer() { startTimer() {
this.testTimer = setInterval(() => { this.testTimer = setInterval(() => {
this.timer.time = this.timer.time + 1; this.timer.time = this.timer.time + 1;
...@@ -536,7 +550,7 @@ export class BoxDialer { ...@@ -536,7 +550,7 @@ export class BoxDialer {
}); });
this.closeBxCall(); this.closeBxCall();
this.hangupButtonClick(); this.hangupButtonClick();
BX?.localStorage?.remove('viExternalCard'); this.removeViExternalCard();
}); });
this.callSession.on('failed', () => { this.callSession.on('failed', () => {
// unable to establish the call // unable to establish the call
...@@ -702,7 +716,7 @@ export class BoxDialer { ...@@ -702,7 +716,7 @@ export class BoxDialer {
window.alovoicePhone.callMethods[bxMethodName](bxFuncParams, callback); window.alovoicePhone.callMethods[bxMethodName](bxFuncParams, callback);
} }
if (bxFuncParams.uiState == '5') { if (bxFuncParams.uiState == '5') {
BX?.localStorage?.remove('viExternalCard'); this.removeViExternalCard();
} }
} }
closeBxCall() { closeBxCall() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment