fix:取消倒计时结束挂断
This commit is contained in:
parent
e3cf148b50
commit
0aaaecede9
@ -275,12 +275,12 @@ class TalkViewLogic extends BaseGetXController {
|
|||||||
Timer.periodic(const Duration(seconds: 1), (Timer t) {
|
Timer.periodic(const Duration(seconds: 1), (Timer t) {
|
||||||
if (state.listData.value.length > 0) {
|
if (state.listData.value.length > 0) {
|
||||||
state.oneMinuteTime.value++;
|
state.oneMinuteTime.value++;
|
||||||
if (state.oneMinuteTime.value >= 60) {
|
// if (state.oneMinuteTime.value >= 60) {
|
||||||
t.cancel(); // 取消定时器
|
// t.cancel(); // 取消定时器
|
||||||
state.oneMinuteTime.value = 0;
|
// state.oneMinuteTime.value = 0;
|
||||||
// 倒计时结束挂断
|
// // 倒计时结束挂断
|
||||||
// udpHangUpAction();
|
// // udpHangUpAction();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -492,7 +492,9 @@ class TalkViewLogic extends BaseGetXController {
|
|||||||
stopProcessingAudio();
|
stopProcessingAudio();
|
||||||
// 清理图片缓存
|
// 清理图片缓存
|
||||||
_imageCache.clear();
|
_imageCache.clear();
|
||||||
|
state.oneMinuteTimeTimer?.cancel(); // 取消旧定时器
|
||||||
|
state.oneMinuteTimeTimer = null; // 取消旧定时器
|
||||||
|
state.oneMinuteTime.value = 0;
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user