diff --git a/Tusker/Preferences/StatusSwipeAction.swift b/Tusker/Preferences/StatusSwipeAction.swift index 2dd22bf43b..00064d513e 100644 --- a/Tusker/Preferences/StatusSwipeAction.swift +++ b/Tusker/Preferences/StatusSwipeAction.swift @@ -97,7 +97,7 @@ private func createFavoriteAction(status: StatusMO, container: StatusSwipeAction } let title = status.favourited ? "Unfavorite" : "Favorite" let action = UIContextualAction(style: .normal, title: title) { [unowned container] _, _, completion in - Task { + Task { @MainActor in await FavoriteService(status: status, mastodonController: container.mastodonController, presenter: container.navigationDelegate).toggleFavorite() completion(true) } @@ -113,7 +113,7 @@ private func createReblogAction(status: StatusMO, container: StatusSwipeActionCo } let title = status.reblogged ? "Unreblog" : "Reblog" let action = UIContextualAction(style: .normal, title: title) { [unowned container] _, _, completion in - Task { + Task { @MainActor in await ReblogService(status: status, mastodonController: container.mastodonController, presenter: container.navigationDelegate).toggleReblog() completion(true) }