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()
|
updateUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func updateUI() {
|
||||||
|
refreshProgressView?.updateRefreshLabel()
|
||||||
|
updateTitleUnreadCount()
|
||||||
|
updateToolbar()
|
||||||
|
}
|
||||||
|
|
||||||
func hideSearch() {
|
func hideSearch() {
|
||||||
navigationItem.searchController?.isActive = false
|
navigationItem.searchController?.isActive = false
|
||||||
}
|
}
|
||||||
|
@ -541,8 +547,7 @@ private extension MasterTimelineViewController {
|
||||||
|
|
||||||
func configureToolbar() {
|
func configureToolbar() {
|
||||||
|
|
||||||
if coordinator.isThreePanelMode {
|
guard !coordinator.isThreePanelMode else {
|
||||||
firstUnreadButton.isHidden = true
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -598,12 +603,6 @@ private extension MasterTimelineViewController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateUI() {
|
|
||||||
refreshProgressView?.updateRefreshLabel()
|
|
||||||
updateTitleUnreadCount()
|
|
||||||
updateToolbar()
|
|
||||||
}
|
|
||||||
|
|
||||||
func setFilterButtonToActive() {
|
func setFilterButtonToActive() {
|
||||||
filterButton?.image = AppAssets.filterActiveImage
|
filterButton?.image = AppAssets.filterActiveImage
|
||||||
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Articles", comment: "Selected - Filter Read Articles")
|
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Articles", comment: "Selected - Filter Read Articles")
|
||||||
|
@ -617,6 +616,11 @@ private extension MasterTimelineViewController {
|
||||||
func updateToolbar() {
|
func updateToolbar() {
|
||||||
markAllAsReadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
markAllAsReadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
||||||
firstUnreadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
firstUnreadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
||||||
|
if coordinator.isRootSplitCollapsed {
|
||||||
|
firstUnreadButton.isHidden = false
|
||||||
|
} else {
|
||||||
|
firstUnreadButton.isHidden = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateTitleUnreadCount() {
|
func updateTitleUnreadCount() {
|
||||||
|
|
|
@ -1204,6 +1204,8 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
||||||
extension SceneCoordinator: UISplitViewControllerDelegate {
|
extension SceneCoordinator: UISplitViewControllerDelegate {
|
||||||
|
|
||||||
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
|
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
|
||||||
|
masterTimelineViewController?.updateUI()
|
||||||
|
|
||||||
guard !isThreePanelMode else {
|
guard !isThreePanelMode else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -1218,6 +1220,8 @@ extension SceneCoordinator: UISplitViewControllerDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
func splitViewController(_ splitViewController: UISplitViewController, separateSecondaryFrom primaryViewController: UIViewController) -> UIViewController? {
|
func splitViewController(_ splitViewController: UISplitViewController, separateSecondaryFrom primaryViewController: UIViewController) -> UIViewController? {
|
||||||
|
masterTimelineViewController?.updateUI()
|
||||||
|
|
||||||
guard !isThreePanelMode else {
|
guard !isThreePanelMode else {
|
||||||
return subSplitViewController
|
return subSplitViewController
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue