mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 20:54:51 +00:00
update startloading
This commit is contained in:
1 file changed
+5
-3
@@ -47,14 +47,15 @@ class EmojiHoarder: BaseHoarder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func startLoading(localOnly: Bool, skipIndex: Bool) {
|
func startLoading(localOnly: Bool, skipIndex: Bool) {
|
||||||
Task.detached {
|
Task {
|
||||||
|
print(localOnly)
|
||||||
if !skipIndex { await self.buildTrie() }
|
if !skipIndex { await self.buildTrie() }
|
||||||
|
|
||||||
guard !localOnly else { return }
|
if !localOnly {
|
||||||
|
|
||||||
print("start loading remote db")
|
print("start loading remote db")
|
||||||
await self.loadRemoteDB()
|
await self.loadRemoteDB()
|
||||||
print("end")
|
print("end")
|
||||||
|
}
|
||||||
|
|
||||||
if !skipIndex {
|
if !skipIndex {
|
||||||
await self.buildTrie()
|
await self.buildTrie()
|
||||||
@@ -190,6 +191,7 @@ class EmojiHoarder: BaseHoarder {
|
|||||||
if let fetched = await fetched {
|
if let fetched = await fetched {
|
||||||
await MainActor.run {
|
await MainActor.run {
|
||||||
withAnimation(.snappy) { self.emojis = fetched }
|
withAnimation(.snappy) { self.emojis = fetched }
|
||||||
|
print(EmojiHoarder.container)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||