修复编译警告

This commit is contained in:
Rust 2025-10-17 21:44:46 +08:00
parent 135d60aaa6
commit 885cd752ed

View File

@ -34,7 +34,7 @@ class AppDelegate: FlutterAppDelegate {
//
//
print("应用程序即将终止")
// Flutter
if let controller = NSApp.windows.first?.contentViewController as? FlutterViewController {
let channel = FlutterMethodChannel(name: "kaer_vpn/terminate", binaryMessenger: controller.engine.binaryMessenger)
@ -42,6 +42,11 @@ class AppDelegate: FlutterAppDelegate {
}
}
//
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
// // window manager restore from dock: https://leanflutter.dev/blog/click-dock-icon-to-restore-after-closing-the-window
// override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
// if !flag {