close chat page bofore remote page

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-05-29 09:46:16 +08:00
parent 3ec13714c9
commit b58fbb26ba
2 changed files with 9 additions and 1 deletions

View File

@ -526,6 +526,7 @@ String formatDurationToTime(Duration duration) {
closeConnection({String? id}) { closeConnection({String? id}) {
if (isAndroid || isIOS) { if (isAndroid || isIOS) {
gFFI.chatModel.hideChatOverlay();
Navigator.popUntil(globalKey.currentContext!, ModalRoute.withName("/")); Navigator.popUntil(globalKey.currentContext!, ModalRoute.withName("/"));
} else { } else {
final controller = Get.find<DesktopTabController>(); final controller = Get.find<DesktopTabController>();

View File

@ -185,6 +185,13 @@ class ChatModel with ChangeNotifier {
} }
} }
hideChatOverlay() {
if (!_isChatOverlayHide()) {
hideChatIconOverlay();
hideChatWindowOverlay();
}
}
showChatPage(int id) async { showChatPage(int id) async {
if (isConnManager) { if (isConnManager) {
if (!_isShowCMChatPage) { if (!_isShowCMChatPage) {