diff --git a/Tusker/Screens/Timeline/TimelineViewController.swift b/Tusker/Screens/Timeline/TimelineViewController.swift index 01ad78df..6b215429 100644 --- a/Tusker/Screens/Timeline/TimelineViewController.swift +++ b/Tusker/Screens/Timeline/TimelineViewController.swift @@ -315,11 +315,11 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro controller.restoreInitial { var snapshot = dataSource.snapshot() snapshot.appendSections([.statuses]) - let items = statusIDs.map { Item.status(id: $0, collapseState: .unknown, filterState: .unknown) } + let items = existingStatuses.map { Item.status(id: $0, collapseState: .unknown, filterState: .unknown) } snapshot.appendItems(items, toSection: .statuses) dataSource.apply(snapshot, animatingDifferences: false) { if let centerID = activity.userInfo?["centerID"] as? String ?? activity.userInfo?["topID"] as? String, - let index = statusIDs.firstIndex(of: centerID), + let index = existingStatuses.firstIndex(of: centerID), let indexPath = self.dataSource.indexPath(for: items[index]) { // it sometimes takes multiple attempts to convert on the right scroll position // since we're dealing with a bunch of unmeasured cells, so just try a few times in a loop