diff --git a/Tusker/Screens/Timeline/TimelineViewController.swift b/Tusker/Screens/Timeline/TimelineViewController.swift index 1ab2f7fe..e6620bc7 100644 --- a/Tusker/Screens/Timeline/TimelineViewController.swift +++ b/Tusker/Screens/Timeline/TimelineViewController.swift @@ -184,6 +184,9 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro } func stateRestorationActivity() -> NSUserActivity? { + guard isViewLoaded else { + return nil + } let visible = collectionView.indexPathsForVisibleItems.sorted() let snapshot = dataSource.snapshot() let visibleRect = CGRect(origin: collectionView.contentOffset, size: collectionView.bounds.size)