mirror of
https://github.com/localsend/localsend.git
synced 2026-06-23 04:10:07 +00:00
fix: add delegate method for URL opening (#2711)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user