@@ -25,11 +25,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
2525 checkForFilesToOpen ( )
2626
2727 NSApp . closeWindow ( . welcome, . about)
28-
28+
2929 // Add test notification
3030 DispatchQueue . main. asyncAfter ( deadline: . now( ) + 2.0 ) {
3131 NotificationManager . shared. post (
32- icon : " bell.badge " ,
32+ iconSymbol : " bell.badge " ,
3333 title: " Welcome to CodeEdit " ,
3434 description: " This is a test notification to demonstrate the notification system. " ,
3535 actionButtonTitle: " Learn More " ,
@@ -38,10 +38,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
3838 }
3939 )
4040 }
41-
41+
4242 DispatchQueue . main. async {
4343 var needToHandleOpen = true
44-
44+
4545 // If no windows were reopened by NSQuitAlwaysKeepsWindows, do default behavior.
4646 // Non-WindowGroup SwiftUI Windows are still in NSApp.windows when they are closed,
4747 // So we need to think about those.
@@ -73,13 +73,13 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
7373 }
7474
7575 func applicationWillTerminate( _ aNotification: Notification ) {
76-
76+
7777 }
78-
78+
7979 func applicationSupportsSecureRestorableState( _ app: NSApplication ) -> Bool {
8080 true
8181 }
82-
82+
8383 func applicationShouldHandleReopen( _ sender: NSApplication , hasVisibleWindows flag: Bool ) -> Bool {
8484 guard flag else {
8585 handleOpen ( )
@@ -92,11 +92,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
9292 sender. windows. first ( where: { $0. isMiniaturized } ) ? . deminiaturize ( sender)
9393 return false
9494 }
95-
95+
9696 func applicationShouldOpenUntitledFile( _ sender: NSApplication ) -> Bool {
9797 false
9898 }
99-
99+
100100 func handleOpen( ) {
101101 let behavior = Settings . shared. preferences. general. reopenBehavior
102102 switch behavior {
@@ -110,15 +110,15 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
110110 CodeEditDocumentController . shared. newDocument ( self )
111111 }
112112 }
113-
113+
114114 /// Handle urls with the form `codeedit://file/{filepath}:{line}:{column}`
115115 func application( _ application: NSApplication , open urls: [ URL ] ) {
116116 for url in urls {
117117 let file = URL ( fileURLWithPath: url. path) . path. split ( separator: " : " )
118118 let filePath = URL ( fileURLWithPath: String ( file [ 0 ] ) )
119119 let line = file. count > 1 ? Int ( file [ 1 ] ) ?? 0 : 0
120120 let column = file. count > 2 ? Int ( file [ 2 ] ) ?? 1 : 1
121-
121+
122122 CodeEditDocumentController . shared
123123 . openDocument ( withContentsOf: filePath, display: true ) { document, _, error in
124124 if let error {
@@ -133,7 +133,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
133133 // Add notification when workspace is opened via URL
134134 if let workspaceDoc = document as? WorkspaceDocument {
135135 NotificationManager . shared. post (
136- icon : " folder.badge.plus " ,
136+ iconSymbol : " folder.badge.plus " ,
137137 title: " Workspace Opened " ,
138138 description: " Successfully opened workspace: \( workspaceDoc. fileURL? . lastPathComponent ?? " " ) " ,
139139 actionButtonTitle: " View Files " ,
@@ -146,7 +146,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
146146 }
147147 }
148148 }
149-
149+
150150 /// Defers the application terminate message until we've finished cleanup.
151151 ///
152152 /// All paths _must_ call `NSApplication.shared.reply(toApplicationShouldTerminate: true)` as soon as possible.
0 commit comments