fix: add delegate method for URL opening (#2711)

This commit is contained in:
Shlomo
2025-09-21 18:59:01 +03:00
committed by GitHub
parent 46d96a6da8
commit b00e187b5b
+12
View File
@@ -264,6 +264,18 @@ class AppDelegate: FlutterAppDelegate {
}
}
}
override func application(_ application: NSApplication, open urls: [URL]) {
for url in urls {
if url.isFileURL {
if let fileBookmark = createBookmarkForFile(at: url) {
Defaults[.pendingFiles].append(fileBookmark)
}
} else {
Defaults[.pendingStrings].append(url.absoluteString)
}
}
}
// END: handle opened files
/// Handle **text** dropped onto the Dock icon