Fix crash on refreshing

This commit is contained in:
Shadowfacts 2020-08-15 14:15:38 -04:00
parent f9b85c87b4
commit 79b23127e9
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 0 additions and 1 deletions

View File

@ -213,7 +213,6 @@ class TimelineTableViewController: EnhancedTableViewController {
let request = Client.getStatuses(timeline: timeline, range: newer) let request = Client.getStatuses(timeline: timeline, range: newer)
mastodonController.run(request) { response in mastodonController.run(request) { response in
guard case let .success(newStatuses, pagination) = response else { fatalError() } guard case let .success(newStatuses, pagination) = response else { fatalError() }
self.timelineSegments[0].insert(contentsOf: newStatuses.map { ($0.id, .unknown) }, at: 0)
// If there is no new newer pagination, don't reset it, so that the user can continue refreshing for more recent statuses // If there is no new newer pagination, don't reset it, so that the user can continue refreshing for more recent statuses
// Otherwise, when no new statuses were loaded, it would get reset and the the user would be unable to refresh // Otherwise, when no new statuses were loaded, it would get reset and the the user would be unable to refresh