fix search

nice overlayed picker gotta clean up tho
and gotta fix slow dl view
This commit is contained in:
neon443 committed 2026-04-05 02:05:19 +01:00
1 parent 5e605fe1b8
commit 18e7956037
3 files changed
+14 -8

No files matched your search

+2 -1
View File
@@ -131,7 +131,8 @@ class EmojiHoarder: Hoarder, ObservableObject {
func buildTrie() {
let start = Date().timeIntervalSince1970
for emoji in emojis {
// trie.insewrt(word: emoji.name)
// trie.insert(word: emoji.name)
trie.wordlist.insert(emoji.name)
trie.dict[emoji.name] = emoji
}
buildDownloadedEmojis()
+11 -6
View File
@@ -14,12 +14,7 @@ struct BrowseView: View {
var body: some View {
VStack {
Picker("", selection: $browseWhat) {
ForEach(StickerType.allCases) { type in
Text(type.description).tag(type)
}
}
.pickerStyle(.segmented)
Group {
switch browseWhat {
case .slackEmoji:
EmojiCollectionView(
@@ -37,6 +32,16 @@ struct BrowseView: View {
}
}
}
.overlay(alignment: .top) {
Picker("", selection: $browseWhat) {
ForEach(StickerType.allCases) { type in
Text(type.description).tag(type)
}
}
.pickerStyle(.segmented)
.padding(.horizontal)
}
}
}
}
+1 -1
View File
@@ -42,7 +42,7 @@ struct DownloadedView: View {
let columns: Int = max(1, Int((geo.size.width - 2*spacing) / (minColWidth + spacing)))
let layout = Array(repeating: col, count: columns)
LazyVGrid(columns: layout, spacing: spacing) {
ForEach(emojiHoarder.downloadedStickers.sorted(), id: \.self) { name in
ForEach(Array(emojiHoarder.downloadedStickers), id: \.self) { name in
if let emoji = emojiHoarder.trie.dict[name] {
ZStack {
Rectangle()
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.