forked from shadowfacts/Tusker
Only try to restore statuses that exist in the cache
This could result in discontinuities in the restored timeline, but I'm not sure there's anything better we could do.
This commit is contained in:
parent
41775e5d19
commit
5f3d9da9f8
|
@ -292,6 +292,10 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
activityToRestore = nil
|
activityToRestore = nil
|
||||||
|
let existingStatuses = statusIDs.filter { mastodonController.persistentContainer.status(for: $0) != nil }
|
||||||
|
guard !existingStatuses.isEmpty else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
loadViewIfNeeded()
|
loadViewIfNeeded()
|
||||||
controller.restoreInitial {
|
controller.restoreInitial {
|
||||||
var snapshot = dataSource.snapshot()
|
var snapshot = dataSource.snapshot()
|
||||||
|
|
Loading…
Reference in New Issue