forked from shadowfacts/Tusker
Fix Recognize Text action accessing view context MO off of main thread
Closes #393
This commit is contained in:
parent
52efc8b752
commit
d938c555b7
|
@ -70,8 +70,8 @@ class AttachmentRowController: ViewController {
|
||||||
private func recognizeText() {
|
private func recognizeText() {
|
||||||
descriptionMode = .recognizingText
|
descriptionMode = .recognizingText
|
||||||
|
|
||||||
DispatchQueue.global(qos: .userInitiated).async {
|
|
||||||
self.attachment.getData(features: self.parent.mastodonController.instanceFeatures, skipAllConversion: true) { result in
|
self.attachment.getData(features: self.parent.mastodonController.instanceFeatures, skipAllConversion: true) { result in
|
||||||
|
DispatchQueue.main.async {
|
||||||
let data: Data
|
let data: Data
|
||||||
switch result {
|
switch result {
|
||||||
case .success((let d, _)):
|
case .success((let d, _)):
|
||||||
|
|
Loading…
Reference in New Issue