forked from shadowfacts/Tusker
Fix @Published property being changed on background thread
This commit is contained in:
parent
937afc0dfd
commit
37563b6afd
|
@ -321,7 +321,9 @@ class MastodonController: ObservableObject {
|
||||||
let request = Client.getCustomEmoji()
|
let request = Client.getCustomEmoji()
|
||||||
run(request) { (response) in
|
run(request) { (response) in
|
||||||
if case let .success(emojis, _) = response {
|
if case let .success(emojis, _) = response {
|
||||||
|
DispatchQueue.main.async {
|
||||||
self.customEmojis = emojis
|
self.customEmojis = emojis
|
||||||
|
}
|
||||||
completion(emojis)
|
completion(emojis)
|
||||||
} else {
|
} else {
|
||||||
completion([])
|
completion([])
|
||||||
|
|
Loading…
Reference in New Issue