mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-03-11 05:19:13 +00:00
ui updates
small fix
This commit is contained in:
@@ -237,7 +237,6 @@ class EmojiHoarder: ObservableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
nonisolated func download(emoji: Emoji, skipStoreIndex: Bool = false) async {
|
nonisolated func download(emoji: Emoji, skipStoreIndex: Bool = false) async {
|
||||||
// Task.detached(priority: .high) {
|
|
||||||
try? await emoji.downloadImage()
|
try? await emoji.downloadImage()
|
||||||
await MainActor.run {
|
await MainActor.run {
|
||||||
if !skipStoreIndex {
|
if !skipStoreIndex {
|
||||||
@@ -248,7 +247,6 @@ class EmojiHoarder: ObservableObject {
|
|||||||
self.trie.dict[emoji.name]?.refresh()
|
self.trie.dict[emoji.name]?.refresh()
|
||||||
if !skipStoreIndex { Haptic.success.trigger() }
|
if !skipStoreIndex { Haptic.success.trigger() }
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
|
|||||||
@@ -91,14 +91,16 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Section("Use with Caution") {
|
Section("Use with Caution") {
|
||||||
Button("download all", role: .destructive) {
|
Button("Download all", systemImage: "square.and.arrow.down.on.square", role: .destructive) {
|
||||||
Task {
|
Task {
|
||||||
await hoarder.downloadAllStickers()
|
await hoarder.downloadAllStickers()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button("delete all", role: .destructive) {
|
.foregroundStyle(.red)
|
||||||
|
Button("Delete all", systemImage: "trash.circle", role: .destructive) {
|
||||||
hoarder.deleteAllStickers()
|
hoarder.deleteAllStickers()
|
||||||
}
|
}
|
||||||
|
.foregroundStyle(.red)
|
||||||
}
|
}
|
||||||
|
|
||||||
Section("Debug") {
|
Section("Debug") {
|
||||||
@@ -108,12 +110,11 @@ struct SettingsView: View {
|
|||||||
Label("Tree", systemImage: "tree")
|
Label("Tree", systemImage: "tree")
|
||||||
}
|
}
|
||||||
|
|
||||||
Button(role: .destructive) {
|
Button("Reindex", systemImage: "list.bullet.clipboard", role: .destructive) {
|
||||||
hoarder.resetAllIndexes()
|
hoarder.resetAllIndexes()
|
||||||
hoarder.buildTrie()
|
hoarder.buildTrie()
|
||||||
} label: {
|
|
||||||
Label("Reindex", systemImage: "list.bullet.clipboard.fill")
|
|
||||||
}
|
}
|
||||||
|
.foregroundStyle(.red)
|
||||||
}
|
}
|
||||||
// Section(content: <#T##() -> View#>, header: <#T##() -> View#>, footer: <#T##() -> View#>)
|
// Section(content: <#T##() -> View#>, header: <#T##() -> View#>, footer: <#T##() -> View#>)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user