fix:对讲时进入后台关闭链接
This commit is contained in:
parent
eb801de7c3
commit
066aff8fdf
@ -28,17 +28,16 @@ class AppLifecycleObserver extends WidgetsBindingObserver {
|
||||
|
||||
void onAppPaused() {
|
||||
// 处理应用程序进入后台的逻辑
|
||||
print('App has entered the background.');
|
||||
if (StartChartManage().talkStatus.status ==
|
||||
TalkStatus.passiveCallWaitingAnswer ||
|
||||
StartChartManage().talkStatus.status ==
|
||||
TalkStatus.proactivelyCallWaitingAnswer) {
|
||||
StartChartManage().startTalkHangupMessageTimer();
|
||||
StartChartManage().startTalkRejectMessageTimer();
|
||||
// 如果是等待接听时就退出页面
|
||||
|
||||
final status = StartChartManage().talkStatus.status;
|
||||
|
||||
if (status == TalkStatus.passiveCallWaitingAnswer ||
|
||||
status == TalkStatus.proactivelyCallWaitingAnswer ||
|
||||
status == TalkStatus.answeredSuccessfully ||
|
||||
status == TalkStatus.uninitialized) {
|
||||
StartChartManage().destruction();
|
||||
Get.back();
|
||||
}
|
||||
StartChartManage().destruction();
|
||||
}
|
||||
|
||||
void onAppResumed() async {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user