2019-09-04 23:24:16 +02:00
|
|
|
//
|
|
|
|
// RootSplitViewController.swift
|
|
|
|
// NetNewsWire-iOS
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 9/4/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
2019-09-05 20:14:14 +02:00
|
|
|
import Account
|
2019-09-04 23:24:16 +02:00
|
|
|
|
|
|
|
class RootSplitViewController: UISplitViewController {
|
|
|
|
|
|
|
|
var coordinator: SceneCoordinator!
|
|
|
|
|
|
|
|
// MARK: Keyboard Shortcuts
|
2019-09-06 04:14:19 +02:00
|
|
|
|
2019-09-05 18:29:04 +02:00
|
|
|
@objc func scrollOrGoToNextUnread(_ sender: Any?) {
|
2019-09-06 04:14:19 +02:00
|
|
|
coordinator.scrollOrGoToNextUnread()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func goToPreviousUnread(_ sender: Any?) {
|
2019-09-06 01:02:40 +02:00
|
|
|
coordinator.selectPrevUnread()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func nextUnread(_ sender: Any?) {
|
2019-09-05 21:50:05 +02:00
|
|
|
coordinator.selectNextUnread()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func markRead(_ sender: Any?) {
|
2019-09-05 21:50:05 +02:00
|
|
|
coordinator.markAsReadForCurrentArticle()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func markUnreadAndGoToNextUnread(_ sender: Any?) {
|
2019-09-05 21:50:05 +02:00
|
|
|
coordinator.markAsUnreadForCurrentArticle()
|
|
|
|
coordinator.selectNextUnread()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func markAllAsReadAndGoToNextUnread(_ sender: Any?) {
|
2019-09-05 21:50:05 +02:00
|
|
|
coordinator.markAllAsReadInTimeline()
|
|
|
|
coordinator.selectNextUnread()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func markOlderArticlesAsRead(_ sender: Any?) {
|
2019-09-05 21:50:05 +02:00
|
|
|
coordinator.markAsReadOlderArticlesInTimeline()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func markUnread(_ sender: Any?) {
|
2019-09-05 21:50:05 +02:00
|
|
|
coordinator.markAsUnreadForCurrentArticle()
|
2019-09-05 18:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func goToPreviousSubscription(_ sender: Any?) {
|
|
|
|
coordinator.selectPrevFeed()
|
|
|
|
}
|
|
|
|
|
|
|
|
@objc func goToNextSubscription(_ sender: Any?) {
|
|
|
|
coordinator.selectNextFeed()
|
|
|
|
}
|
2019-09-04 23:24:16 +02:00
|
|
|
|
|
|
|
@objc func openInBrowser(_ sender: Any?) {
|
|
|
|
coordinator.showBrowserForCurrentArticle()
|
|
|
|
}
|
|
|
|
|
2019-09-07 16:01:29 +02:00
|
|
|
@objc func articleSearch(_ sender: Any?) {
|
|
|
|
coordinator.showSearch()
|
|
|
|
}
|
|
|
|
|
2019-09-05 20:14:14 +02:00
|
|
|
@objc func addNewFeed(_ sender: Any?) {
|
2019-09-05 22:07:35 +02:00
|
|
|
coordinator.showAdd(.feed)
|
2019-09-05 20:14:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func addNewFolder(_ sender: Any?) {
|
2019-09-05 22:07:35 +02:00
|
|
|
coordinator.showAdd(.folder)
|
2019-09-05 20:14:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@objc func refresh(_ sender: Any?) {
|
|
|
|
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.present(self))
|
|
|
|
}
|
|
|
|
|
|
|
|
@objc func goToToday(_ sender: Any?) {
|
|
|
|
coordinator.selectTodayFeed()
|
|
|
|
}
|
|
|
|
|
|
|
|
@objc func goToAllUnread(_ sender: Any?) {
|
|
|
|
coordinator.selectAllUnreadFeed()
|
|
|
|
}
|
|
|
|
|
|
|
|
@objc func goToStarred(_ sender: Any?) {
|
|
|
|
coordinator.selectStarredFeed()
|
|
|
|
}
|
|
|
|
|
2019-09-05 22:43:01 +02:00
|
|
|
@objc func toggleRead(_ sender: Any?) {
|
|
|
|
coordinator.toggleReadForCurrentArticle()
|
|
|
|
}
|
|
|
|
|
|
|
|
@objc func toggleStarred(_ sender: Any?) {
|
|
|
|
coordinator.toggleStarredForCurrentArticle()
|
|
|
|
}
|
|
|
|
|
2019-09-04 23:24:16 +02:00
|
|
|
}
|