mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix deprecation warnings related to UTIs.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
import Account
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
class ImportOPMLWindowController: NSWindowController {
|
||||
|
||||
@@ -85,7 +86,7 @@ class ImportOPMLWindowController: NSWindowController {
|
||||
panel.allowsMultipleSelection = false
|
||||
panel.canChooseDirectories = false
|
||||
panel.resolvesAliases = true
|
||||
panel.allowedFileTypes = ["opml", "xml"]
|
||||
panel.allowedContentTypes = [UTType.opml, UTType.xml]
|
||||
panel.allowsOtherFileTypes = false
|
||||
|
||||
panel.beginSheetModal(for: hostWindow!) { modalResult in
|
||||
@@ -104,3 +105,8 @@ class ImportOPMLWindowController: NSWindowController {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension UTType {
|
||||
|
||||
static let opml = UTType("public.opml")!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user