forked from shadowfacts/Tusker
Fix crash when refreshing polls
This commit is contained in:
parent
0b6c16b0a6
commit
3e5c441b24
|
@ -213,7 +213,9 @@ extension MenuActionProvider {
|
|||
case .success(let status, _):
|
||||
// todo: this shouldn't really use the viewContext, but for some reason saving the
|
||||
// backgroundContext with the new version of the status isn't updating the viewContext
|
||||
DispatchQueue.main.async {
|
||||
mastodonController.persistentContainer.addOrUpdate(status: status, context: mastodonController.persistentContainer.viewContext)
|
||||
}
|
||||
case .failure(let error):
|
||||
if let toastable = self?.toastableViewController {
|
||||
let config = ToastConfiguration(from: error, with: "Error Refreshing Poll", in: toastable, retryAction: nil)
|
||||
|
|
Loading…
Reference in New Issue