forked from shadowfacts/Tusker
Fix crash when getting account relationship fails
UIDeferredMenuElement completion handler should only be called from the main thread
This commit is contained in:
parent
85e1e131f6
commit
99e06441f0
|
@ -67,7 +67,9 @@ extension MenuPreviewProvider {
|
||||||
guard let self = self,
|
guard let self = self,
|
||||||
case let .success(results, _) = response,
|
case let .success(results, _) = response,
|
||||||
let relationship = results.first else {
|
let relationship = results.first else {
|
||||||
elementHandler([])
|
DispatchQueue.main.async {
|
||||||
|
elementHandler([])
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let following = relationship.following
|
let following = relationship.following
|
||||||
|
|
Loading…
Reference in New Issue