Commit 9b62f42b authored by Muhammadali's avatar Muhammadali

update-

parent 4a51d89e
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "4.8.59", "version": "4.8.60",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
This diff is collapsed.
...@@ -39,9 +39,11 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => { ...@@ -39,9 +39,11 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
} }
}, [secondLine]); }, [secondLine]);
useEffect(()=> {
boxDialer.setGlobalHistoryData(useColorConfigStore.state)
}, [useColorConfigStore.state])
useEffect(() => { useEffect(() => {
boxDialer.globalHistoryData = useColorConfigStore.state
if (wsphonedata && wsphonedata?.number) { if (wsphonedata && wsphonedata?.number) {
boxDialer.setSipStateChangeCallback(setDynamicValue, 'dynamicValue'); boxDialer.setSipStateChangeCallback(setDynamicValue, 'dynamicValue');
boxDialer.setSipStateChangeCallback(setModalState, 'modalState'); boxDialer.setSipStateChangeCallback(setModalState, 'modalState');
...@@ -90,33 +92,11 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => { ...@@ -90,33 +92,11 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
}; };
useEffect(()=> { // useEffect(()=> {
console.log('auto_answer running: ', modalState.callType === 'incoming' && modalState.bool) // console.log('auto_answer running: ', modalState.callType === 'incoming' && modalState.bool)
if(modalState.callType === 'incoming' && modalState.bool){ //
let second // }, [modalState.callType, modalState.bool, useColorConfigStore.state?.autoAnswer, useColorConfigStore.state?.autoAnswerSecond])
if(useColorConfigStore.state?.autoAnswer) { //
switch (useColorConfigStore.state?.autoAnswerSecond) {
case 1:
second = 1000
break
case 40:
second = 3000
break
case 100:
second = 6000
break
default:
second = 0
}
console.log('auto_answer second: ', second)
setTimeout(() => {
console.log('auto_answer run boxDialer.answerButtonClick()')
boxDialer.answerButtonClick()
}, second)
}
}
}, [modalState.callType, modalState.bool, useColorConfigStore.state?.autoAnswer, useColorConfigStore.state?.autoAnswerSecond])
const selectWidjetType = (type) => { const selectWidjetType = (type) => {
switch (type) { switch (type) {
......
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