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