reduced usage of isLocal in favour of checking hoarder.downloadedEmojis

wrote tests to check that, Set checking is 1.5 to 2x faster
This commit is contained in:
neon443 committed 2025-11-05 19:50:10 +00:00
1 parent c3cfecb87e
commit 08ad69b19a
4 files changed
+16 -4

No files matched your search

+2 -2
View File
@@ -21,7 +21,7 @@ class EmojiHoarder: ObservableObject {
@Published var trie: Trie = Trie()
@Published var filteredEmojis: [String] = []
@Published var downloadedEmojis: [String] = []
@Published var downloadedEmojis: Set<String> = []
@Published var searchTerm: String = ""
init(localOnly: Bool = false) {
@@ -97,7 +97,7 @@ class EmojiHoarder: ObservableObject {
downloadedEmojis = []
for emoji in emojis {
guard emoji.isLocal else { continue }
downloadedEmojis.append(emoji.name)
downloadedEmojis.insert(emoji.name)
}
}
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.