fixed search

disabled load and save trie cos its too slow
This commit is contained in:
neon443 committed 2025-11-15 19:29:54 +00:00
1 parent 7b911d932c
commit 7ca11e49a1
2 files changed
+5 -3

No files matched your search

+3
View File
@@ -73,7 +73,9 @@ class EmojiHoarder: ObservableObject {
downloadedEmojis = []
}
//cl i disabled ts cos its quicker to rebuild it then to load ts
func saveTrie() {
return
guard let data = try? encoder.encode(trie.root) else {
fatalError("failed to encode trie")
}
@@ -86,6 +88,7 @@ class EmojiHoarder: ObservableObject {
}
func loadTrie() {
return
guard FileManager.default.fileExists(atPath: EmojiHoarder.localTrie.path) else { return }
guard let data = try? Data(contentsOf: EmojiHoarder.localTrie) else { return }
guard let decoded = try? decoder.decode(TrieNode.self, from: data) else {
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.