mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Merge branch 'master' of https://github.com/brentsimmons/Evergreen
This commit is contained in:
@@ -19,7 +19,7 @@ final class MainWindowKeyboardHandler: KeyboardDelegate {
|
||||
let f = Bundle.main.path(forResource: "GlobalKeyboardShortcuts", ofType: "plist")!
|
||||
let rawShortcuts = NSArray(contentsOfFile: f)! as! [[String: Any]]
|
||||
|
||||
self.globalShortcuts = Set(rawShortcuts.flatMap { KeyboardShortcut(dictionary: $0) })
|
||||
self.globalShortcuts = Set(rawShortcuts.compactMap { KeyboardShortcut(dictionary: $0) })
|
||||
}
|
||||
|
||||
func keydown(_ event: NSEvent, in view: NSView) -> Bool {
|
||||
|
||||
@@ -113,7 +113,7 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
|
||||
// MARK: Toolbar
|
||||
|
||||
@objc func makeToolbarValidate(_ sender: Any) {
|
||||
@objc func makeToolbarValidate(_ sender: Any?) {
|
||||
|
||||
window?.toolbar?.validateVisibleItems()
|
||||
}
|
||||
@@ -332,7 +332,7 @@ extension MainWindowController: NSSharingServicePickerDelegate {
|
||||
|
||||
func sharingServicePicker(_ sharingServicePicker: NSSharingServicePicker, sharingServicesForItems items: [Any], proposedSharingServices proposedServices: [NSSharingService]) -> [NSSharingService] {
|
||||
|
||||
let sendToServices = appDelegate.sendToCommands.flatMap { (sendToCommand) -> NSSharingService? in
|
||||
let sendToServices = appDelegate.sendToCommands.compactMap { (sendToCommand) -> NSSharingService? in
|
||||
|
||||
guard let object = items.first else {
|
||||
return nil
|
||||
|
||||
@@ -19,7 +19,7 @@ import RSCore
|
||||
let f = Bundle.main.path(forResource: "SidebarKeyboardShortcuts", ofType: "plist")!
|
||||
let rawShortcuts = NSArray(contentsOfFile: f)! as! [[String: Any]]
|
||||
|
||||
self.shortcuts = Set(rawShortcuts.flatMap { KeyboardShortcut(dictionary: $0) })
|
||||
self.shortcuts = Set(rawShortcuts.compactMap { KeyboardShortcut(dictionary: $0) })
|
||||
|
||||
super.init()
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ extension Array where Element == Article {
|
||||
|
||||
func articlesForIndexes(_ indexes: IndexSet) -> Set<Article> {
|
||||
|
||||
return Set(indexes.flatMap{ (oneIndex) -> Article? in
|
||||
return Set(indexes.compactMap{ (oneIndex) -> Article? in
|
||||
return articleAtRow(oneIndex)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import RSCore
|
||||
let f = Bundle.main.path(forResource: "TimelineKeyboardShortcuts", ofType: "plist")!
|
||||
let rawShortcuts = NSArray(contentsOfFile: f)! as! [[String: Any]]
|
||||
|
||||
self.shortcuts = Set(rawShortcuts.flatMap { KeyboardShortcut(dictionary: $0) })
|
||||
self.shortcuts = Set(rawShortcuts.compactMap { KeyboardShortcut(dictionary: $0) })
|
||||
|
||||
super.init()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user