From 856006a19f5f5b8f1992afc7edeb9f680afe33da Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 11 Sep 2019 10:41:48 -0500 Subject: [PATCH] Fixed timeline loading bug for portrait on the iPad --- iOS/MasterTimeline/MasterTimelineViewController.swift | 3 ++- iOS/SceneCoordinator.swift | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index 154729281..c453568db 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -68,13 +68,13 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner numberOfTextLines = AppDefaults.timelineNumberOfLines resetEstimatedRowHeight() - applyChanges(animate: false) resetUI() } override func viewWillAppear(_ animated: Bool) { clearsSelectionOnViewWillAppear = coordinator.isRootSplitCollapsed + applyChanges(animate: false) super.viewWillAppear(animated) } @@ -495,6 +495,7 @@ private extension MasterTimelineViewController { var snapshot = NSDiffableDataSourceSnapshot() snapshot.appendSections([0]) snapshot.appendItems(coordinator.articles, toSection: 0) + print("********* article count: \(coordinator.articles.count)") dataSource.apply(snapshot, animatingDifferences: animate) { [weak self] in self?.restoreSelectionIfNecessary() diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 6fd4931f9..1817ff098 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -1571,7 +1571,6 @@ private extension SceneCoordinator { let timelineController = UIStoryboard.main.instantiateController(ofType: MasterTimelineViewController.self) timelineController.coordinator = self masterNavigationController.pushViewController(timelineController, animated: false) - timelineController.restoreSelectionIfNecessary() } // Pull the detail or no selection controller out of the sub split second position and move it to the root split controller