Commit 9b62f42b authored by Muhammadali's avatar Muhammadali

update-

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