backCallingPageFormFloatWindow method

void backCallingPageFormFloatWindow()

Implementation

void backCallingPageFormFloatWindow() {
  CallKitUILog.i(
    _tag,
    'backCallingPageFormFloatWindow: currentPage = ${NECallKitNavigatorObserver.currentPage}, isClose = ${NECallKitNavigatorObserver.isClose}',
  );

  // 如果当前已经有通话页面,不需要再次 push,只需要刷新状态即可
  if (NECallKitNavigatorObserver.currentPage == CallPage.callingPage &&
      (Platform.isIOS || PlatformCompat.isOhos)) {
    CallKitUILog.i(
      _tag,
      'backCallingPageFormFloatWindow: Already in calling page, just update state',
    );
    CallState.instance.isOpenFloatWindow = false;

    // 通知刷新视频 view
    NEEventNotify().notify('refreshVideoViews');
  } else {
    // 如果不在通话页面,则进入通话页面
    CallKitUILog.i(
      _tag,
      'backCallingPageFormFloatWindow: Entering calling page',
    );
    _enterCallingPage('back_from_float_window');
    CallState.instance.isOpenFloatWindow = false;
  }
}