Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
feat: hide application to dock macos (#5592)
Mathias Mogensend8b32168a962
diff --git a/frontend/appflowy_flutter/lib/startup/tasks/windows.dart b/frontend/appflowy_flutter/lib/startup/tasks/windows.dartindex 4d7bd47a33..78486e3320 100644--- a/frontend/appflowy_flutter/lib/startup/tasks/windows.dart+++ b/frontend/appflowy_flutter/lib/startup/tasks/windows.dart@@ -64,11 +64,6 @@ class InitAppWindowTask extends LaunchTask with WindowListener {await windowManager.show();await windowManager.focus();- if (PlatformExtension.isWindows) {- // Hide title bar on Windows, we implement a custom solution elsewhere- await windowManager.setTitleBarStyle(TitleBarStyle.hidden);- }-if (position != null) {await windowManager.setPosition(position);}diff --git a/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift b/frontend/appflowy_flutter/macos/Runner/AppDelegate.swiftindex d53ef64377..cad0330b85 100644--- a/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift+++ b/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift@@ -4,6 +4,16 @@ import FlutterMacOS@NSApplicationMainclass AppDelegate: FlutterAppDelegate {override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {+ return false+ }++ override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {+ if !flag {+ for window in sender.windows {+ window.makeKeyAndOrderFront(self)+ }+ }+return true}}diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yamlindex 6276425e78..67241c3ec0 100644--- a/frontend/appflowy_flutter/pubspec.yaml+++ b/frontend/appflowy_flutter/pubspec.yaml@@ -147,6 +147,7 @@ dependencies:# BitsDojo Window for Windowsbitsdojo_window: ^0.1.6+flutter_highlight: ^0.7.0dev_dependencies: