diff --git a/flutter/lib/desktop/pages/server_page.dart b/flutter/lib/desktop/pages/server_page.dart index c26c0bf7a..deed70085 100644 --- a/flutter/lib/desktop/pages/server_page.dart +++ b/flutter/lib/desktop/pages/server_page.dart @@ -185,7 +185,7 @@ class ConnectionManagerState extends State { ChatPage(type: ChatPageType.desktopCM)), ), ) - : Offstage(), + : Expanded(child: Container()), ), SizedBox( width: kConnectionManagerWindowSizeClosedChat.width - diff --git a/flutter/lib/models/chat_model.dart b/flutter/lib/models/chat_model.dart index 8b5027037..8c59f5f8a 100644 --- a/flutter/lib/models/chat_model.dart +++ b/flutter/lib/models/chat_model.dart @@ -270,16 +270,16 @@ class ChatModel with ChangeNotifier { gFFI.chatModel.changeCurrentKey(key); } if (_isShowCMChatPage) { - _isShowCMChatPage = !_isShowCMChatPage; - notifyListeners(); - await windowManager.show(); await windowManager.setSizeAlignment( kConnectionManagerWindowSizeClosedChat, Alignment.topRight); + await windowManager.show(); + _isShowCMChatPage = !_isShowCMChatPage; + notifyListeners(); } else { requestChatInputFocus(); - await windowManager.show(); await windowManager.setSizeAlignment( kConnectionManagerWindowSizeOpenChat, Alignment.topRight); + await windowManager.show(); _isShowCMChatPage = !_isShowCMChatPage; notifyListeners(); }