ui updates

small fix
This commit is contained in:
neon443 committed 2025-11-22 20:21:30 +00:00
1 parent b15684d09a
commit e8ff53d87b
2 files changed
+15 -16

No files matched your search

+9 -11
View File
@@ -237,18 +237,16 @@ class EmojiHoarder: ObservableObject {
}
nonisolated func download(emoji: Emoji, skipStoreIndex: Bool = false) async {
// Task.detached(priority: .high) {
try? await emoji.downloadImage()
await MainActor.run {
if !skipStoreIndex {
self.downloadedEmojis.insert(emoji.name)
self.downloadedEmojisArr.append(emoji.name)
self.storeDownloadedIndexes()
}
self.trie.dict[emoji.name]?.refresh()
if !skipStoreIndex { Haptic.success.trigger() }
try? await emoji.downloadImage()
await MainActor.run {
if !skipStoreIndex {
self.downloadedEmojis.insert(emoji.name)
self.downloadedEmojisArr.append(emoji.name)
self.storeDownloadedIndexes()
}
// }
self.trie.dict[emoji.name]?.refresh()
if !skipStoreIndex { Haptic.success.trigger() }
}
}
@MainActor
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.