Fix non-ui-thread modification in when editing poll (IOS-203)
This commit is contained in:
parent
7323cb9d08
commit
0f3c50ba8a
|
@ -110,8 +110,6 @@ extension StatusSection {
|
|||
indexPath: IndexPath,
|
||||
configuration: ThreadCellRegistrationConfiguration
|
||||
) -> UITableViewCell {
|
||||
let managedObjectContext = context.managedObjectContext
|
||||
|
||||
switch configuration.thread {
|
||||
case .root(let threadContext):
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: StatusThreadRootTableViewCell.self), for: indexPath) as! StatusThreadRootTableViewCell
|
||||
|
|
|
@ -283,7 +283,7 @@ public final class ComposeContentViewModel: NSObject, ObservableObject {
|
|||
isContentWarningActive = true
|
||||
contentWarning = status.entity.spoilerText ?? ""
|
||||
}
|
||||
Task {
|
||||
Task { @MainActor in
|
||||
if let poll = await status.getPoll(in: context.managedObjectContext, domain: authContext.mastodonAuthenticationBox.domain) {
|
||||
isPollActive = !poll.expired
|
||||
pollMultipleConfigurationOption = poll.multiple
|
||||
|
|
Loading…
Reference in New Issue