Prevent crash when displaying accounts with no pinned statuses
This commit is contained in:
parent
cf5b97d9c8
commit
986fc5b833
|
@ -109,6 +109,7 @@ class ProfileTableViewController: EnhancedTableViewController {
|
|||
|
||||
getStatuses(onlyPinned: true) { (response) in
|
||||
guard case let .success(statuses, _) = response else { fatalError() }
|
||||
if statuses.isEmpty { return }
|
||||
|
||||
self.mastodonController.persistentContainer.addAll(statuses: statuses) {
|
||||
self.pinnedStatuses = statuses.map { ($0.id, .unknown) }
|
||||
|
|
Loading…
Reference in New Issue