Revert "try fix linux cm abnormal show"

This reverts commit 193426a3c10cb063db644068ac6f0df43c197341.
This commit is contained in:
21pages 2023-07-11 10:01:56 +08:00
parent e927d49aa2
commit d7ef3df2b3
2 changed files with 5 additions and 5 deletions

View File

@ -186,7 +186,7 @@ class ConnectionManagerState extends State<ConnectionManager> {
ChatPage(type: ChatPageType.desktopCM)), ChatPage(type: ChatPageType.desktopCM)),
), ),
) )
: Expanded(child: Container()), : Offstage(),
), ),
SizedBox( SizedBox(
width: kConnectionManagerWindowSizeClosedChat.width - width: kConnectionManagerWindowSizeClosedChat.width -

View File

@ -277,16 +277,16 @@ class ChatModel with ChangeNotifier {
gFFI.chatModel.changeCurrentKey(key); gFFI.chatModel.changeCurrentKey(key);
} }
if (_isShowCMChatPage) { if (_isShowCMChatPage) {
await windowManager.setSizeAlignment(
kConnectionManagerWindowSizeClosedChat, Alignment.topRight);
await windowManager.show();
_isShowCMChatPage = !_isShowCMChatPage; _isShowCMChatPage = !_isShowCMChatPage;
notifyListeners(); notifyListeners();
await windowManager.show();
await windowManager.setSizeAlignment(
kConnectionManagerWindowSizeClosedChat, Alignment.topRight);
} else { } else {
requestChatInputFocus(); requestChatInputFocus();
await windowManager.show();
await windowManager.setSizeAlignment( await windowManager.setSizeAlignment(
kConnectionManagerWindowSizeOpenChat, Alignment.topRight); kConnectionManagerWindowSizeOpenChat, Alignment.topRight);
await windowManager.show();
_isShowCMChatPage = !_isShowCMChatPage; _isShowCMChatPage = !_isShowCMChatPage;
notifyListeners(); notifyListeners();
} }