DispatchQueue.main.async
This commit is contained in:
parent
4f8ca8d481
commit
cd6bdead01
|
@ -195,12 +195,12 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte
|
||||||
) { _ in
|
) { _ in
|
||||||
UIPasteboard.general.url = url
|
UIPasteboard.general.url = url
|
||||||
},
|
},
|
||||||
|
|
||||||
UIAction(
|
UIAction(
|
||||||
title: L10n.Common.Controls.Actions.share,
|
title: L10n.Common.Controls.Actions.share,
|
||||||
image: Asset.Arrow.squareAndArrowUp.image.withRenderingMode(.alwaysTemplate)
|
image: Asset.Arrow.squareAndArrowUp.image.withRenderingMode(.alwaysTemplate)
|
||||||
) { _ in
|
) { _ in
|
||||||
Task {
|
DispatchQueue.main.async {
|
||||||
await MainActor.run {
|
|
||||||
let activityViewController = UIActivityViewController(
|
let activityViewController = UIActivityViewController(
|
||||||
activityItems: [
|
activityItems: [
|
||||||
URLActivityItemWithMetadata(url: url) { metadata in
|
URLActivityItemWithMetadata(url: url) { metadata in
|
||||||
|
@ -222,14 +222,13 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte
|
||||||
transition: .activityViewControllerPresent(animated: true)
|
transition: .activityViewControllerPresent(animated: true)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
UIAction(
|
UIAction(
|
||||||
title: L10n.Common.Controls.Status.Actions.shareLinkInPost,
|
title: L10n.Common.Controls.Status.Actions.shareLinkInPost,
|
||||||
image: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate)
|
image: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate)
|
||||||
) { _ in
|
) { _ in
|
||||||
Task {
|
DispatchQueue.main.async {
|
||||||
await MainActor.run {
|
|
||||||
self.coordinator.present(
|
self.coordinator.present(
|
||||||
scene: .compose(viewModel: ComposeViewModel(
|
scene: .compose(viewModel: ComposeViewModel(
|
||||||
context: self.context,
|
context: self.context,
|
||||||
|
@ -242,7 +241,6 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue