Only show the timeline next read button when the root split view controller is collapsed. Issue #1822
This commit is contained in:
parent
49257970af
commit
833c336f2f
|
@ -195,6 +195,12 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
|||
updateUI()
|
||||
}
|
||||
|
||||
func updateUI() {
|
||||
refreshProgressView?.updateRefreshLabel()
|
||||
updateTitleUnreadCount()
|
||||
updateToolbar()
|
||||
}
|
||||
|
||||
func hideSearch() {
|
||||
navigationItem.searchController?.isActive = false
|
||||
}
|
||||
|
@ -541,8 +547,7 @@ private extension MasterTimelineViewController {
|
|||
|
||||
func configureToolbar() {
|
||||
|
||||
if coordinator.isThreePanelMode {
|
||||
firstUnreadButton.isHidden = true
|
||||
guard !coordinator.isThreePanelMode else {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -598,12 +603,6 @@ private extension MasterTimelineViewController {
|
|||
|
||||
}
|
||||
|
||||
func updateUI() {
|
||||
refreshProgressView?.updateRefreshLabel()
|
||||
updateTitleUnreadCount()
|
||||
updateToolbar()
|
||||
}
|
||||
|
||||
func setFilterButtonToActive() {
|
||||
filterButton?.image = AppAssets.filterActiveImage
|
||||
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Articles", comment: "Selected - Filter Read Articles")
|
||||
|
@ -617,6 +616,11 @@ private extension MasterTimelineViewController {
|
|||
func updateToolbar() {
|
||||
markAllAsReadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
||||
firstUnreadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
||||
if coordinator.isRootSplitCollapsed {
|
||||
firstUnreadButton.isHidden = false
|
||||
} else {
|
||||
firstUnreadButton.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
func updateTitleUnreadCount() {
|
||||
|
|
|
@ -1204,6 +1204,8 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
|||
extension SceneCoordinator: UISplitViewControllerDelegate {
|
||||
|
||||
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
|
||||
masterTimelineViewController?.updateUI()
|
||||
|
||||
guard !isThreePanelMode else {
|
||||
return true
|
||||
}
|
||||
|
@ -1218,6 +1220,8 @@ extension SceneCoordinator: UISplitViewControllerDelegate {
|
|||
}
|
||||
|
||||
func splitViewController(_ splitViewController: UISplitViewController, separateSecondaryFrom primaryViewController: UIViewController) -> UIViewController? {
|
||||
masterTimelineViewController?.updateUI()
|
||||
|
||||
guard !isThreePanelMode else {
|
||||
return subSplitViewController
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue