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