Add the Add scene as a home page quick action.

This commit is contained in:
Maurice Parker 2019-09-02 15:14:26 -05:00
parent b768877e23
commit 2c4531f481
2 changed files with 7 additions and 1 deletions

View File

@ -206,7 +206,11 @@ private extension AppDelegate {
let searchIcon = UIApplicationShortcutIcon(systemImageName: "magnifyingglass")
let searchItem = UIApplicationShortcutItem(type: "com.ranchero.NetNewsWire.ShowSearch", localizedTitle: searchTitle, localizedSubtitle: nil, icon: searchIcon, userInfo: nil)
UIApplication.shared.shortcutItems = [searchItem, unreadItem]
let addTitle = NSLocalizedString("Add", comment: "Add")
let addIcon = UIApplicationShortcutIcon(systemImageName: "plus")
let addItem = UIApplicationShortcutItem(type: "com.ranchero.NetNewsWire.ShowAdd", localizedTitle: addTitle, localizedSubtitle: nil, icon: addIcon, userInfo: nil)
UIApplication.shared.shortcutItems = [addItem, searchItem, unreadItem]
}
}

View File

@ -64,6 +64,8 @@ private extension SceneDelegate {
coordinator.selectFirstUnreadInAllUnread()
case "com.ranchero.NetNewsWire.ShowSearch":
coordinator.showSearch()
case "com.ranchero.NetNewsWire.ShowAdd":
coordinator.showAdd()
default:
break
}