mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-23 16:20:53 +01:00
Implemented Clean Up keyboard shortcut. Issue #1915
This commit is contained in:
parent
c08b6d1ccc
commit
07042b8a2a
@ -135,7 +135,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
|
||||
func manualRefresh(errorHandler: @escaping (Error) -> ()) {
|
||||
UIApplication.shared.connectedScenes.compactMap( { $0.delegate as? SceneDelegate } ).forEach {
|
||||
$0.refreshInterface()
|
||||
$0.cleanUp()
|
||||
}
|
||||
AccountManager.shared.refreshAll(errorHandler: errorHandler)
|
||||
}
|
||||
|
@ -144,6 +144,9 @@ private extension KeyboardManager {
|
||||
let markAllAsReadTitle = NSLocalizedString("Mark All as Read", comment: "Mark All as Read")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: markAllAsReadTitle, action: "markAllAsRead:", input: "k", modifiers: [.command]))
|
||||
|
||||
let cleanUp = NSLocalizedString("Clean Up", comment: "Clean Up")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: cleanUp, action: "cleanUp:", input: "h", modifiers: [.command, .shift]))
|
||||
|
||||
return keys
|
||||
}
|
||||
|
||||
|
@ -90,6 +90,10 @@ class RootSplitViewController: UISplitViewController {
|
||||
coordinator.showAdd(.folder)
|
||||
}
|
||||
|
||||
@objc func cleanUp(_ sender: Any?) {
|
||||
coordinator.cleanUp()
|
||||
}
|
||||
|
||||
@objc func refresh(_ sender: Any?) {
|
||||
appDelegate.manualRefresh(errorHandler: ErrorHandler.present(self))
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
||||
fetchRequestQueue.cancelAllRequests()
|
||||
}
|
||||
|
||||
func refreshInterface() {
|
||||
func cleanUp() {
|
||||
if isReadFeedsFiltered {
|
||||
rebuildBackingStores()
|
||||
}
|
||||
|
@ -84,8 +84,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
coordinator.suspend()
|
||||
}
|
||||
|
||||
func refreshInterface() {
|
||||
coordinator.refreshInterface()
|
||||
func cleanUp() {
|
||||
coordinator.cleanUp()
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user