diff --git a/Tusker/Screens/Utilities/Previewing.swift b/Tusker/Screens/Utilities/Previewing.swift index f7274c94..1f9f3d4c 100644 --- a/Tusker/Screens/Utilities/Previewing.swift +++ b/Tusker/Screens/Utilities/Previewing.swift @@ -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 - mastodonController.persistentContainer.addOrUpdate(status: status, context: mastodonController.persistentContainer.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)