Prevent race in status action account list
This commit is contained in:
parent
b220948e2b
commit
f4f2a5546c
|
@ -82,10 +82,11 @@ class StatusActionAccountListTableViewController: EnhancedTableViewController {
|
||||||
let request = actionType == .favorite ? Status.getFavourites(status.id) : Status.getReblogs(status.id)
|
let request = actionType == .favorite ? Status.getFavourites(status.id) : Status.getReblogs(status.id)
|
||||||
mastodonController.run(request) { (response) in
|
mastodonController.run(request) { (response) in
|
||||||
guard case let .success(accounts, _) = response else { fatalError() }
|
guard case let .success(accounts, _) = response else { fatalError() }
|
||||||
self.mastodonController.persistentContainer.addAll(accounts: accounts)
|
self.mastodonController.persistentContainer.addAll(accounts: accounts) {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.accountIDs = accounts.map { $0.id }
|
self.accountIDs = accounts.map { $0.id }
|
||||||
self.tableView.tableFooterView = nil
|
self.tableView.tableFooterView = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue