Replace WIndowGroup with Window to fix multi window and terminate issue

This commit is contained in:
Kyle 2024-10-13 12:11:50 +08:00
parent 27d5b03321
commit 3d5fdd528b
No known key found for this signature in database
GPG key ID: 7056354A082F5CC2

View file

@ -11,7 +11,7 @@ struct XcodesApp: App {
@StateObject private var updater = ObservableUpdater()
var body: some Scene {
WindowGroup("Xcodes") {
Window("Xcodes", id: "main") {
MainWindow()
.environmentObject(appState)
.environmentObject(updater)
@ -166,10 +166,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
func applicationDidFinishLaunching(_: Notification) {}
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
true
}
}
func localizeString(_ key: String, comment: String = "") -> String {