mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
fix search not working after backspacing it all
put downloaded glyph below sticker type icon
This commit is contained in:
2 files changed
+20
-22
No files matched your search
@@ -30,27 +30,25 @@ struct StickerRow<T: Hoarder>: View {
|
|||||||
.foregroundColor(isDownloaded ? .green : .primary)
|
.foregroundColor(isDownloaded ? .green : .primary)
|
||||||
.lineLimit(nil)
|
.lineLimit(nil)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
HStack(spacing: 5) {
|
Button {
|
||||||
Button {
|
showTooltip.toggle()
|
||||||
showTooltip.toggle()
|
} label: {
|
||||||
} label: {
|
Image(sticker.typeGlyph)
|
||||||
Image(sticker.typeGlyph)
|
.resizable().scaledToFit()
|
||||||
.resizable().scaledToFit()
|
.frame(maxHeight: 20)
|
||||||
.frame(maxHeight: 20)
|
.foregroundStyle(.gray)
|
||||||
.foregroundStyle(.gray)
|
}
|
||||||
}
|
.buttonStyle(.borderless)
|
||||||
.buttonStyle(.borderless)
|
.alert("From Slack", isPresented: $showTooltip) {
|
||||||
.alert("From Slack", isPresented: $showTooltip) {
|
Button("Done") {}
|
||||||
Button("Done") {}
|
}
|
||||||
}
|
if isDownloaded {
|
||||||
if isDownloaded {
|
Image(systemName: "arrow.down.circle.fill")
|
||||||
Image(systemName: "arrow.down.circle.fill")
|
.resizable().scaledToFit()
|
||||||
.resizable().scaledToFit()
|
.frame(width: 20, height: 20)
|
||||||
.frame(width: 20, height: 20)
|
.symbolRenderingMode(.hierarchical)
|
||||||
.symbolRenderingMode(.hierarchical)
|
.foregroundStyle(.gray)
|
||||||
.foregroundStyle(.gray)
|
.transition(.scale)
|
||||||
.transition(.scale)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(5)
|
.padding(5)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ struct SearchView: View {
|
|||||||
guard !searchTerm.isEmpty else {
|
guard !searchTerm.isEmpty else {
|
||||||
currentSearch?.cancel()
|
currentSearch?.cancel()
|
||||||
searchResult = []
|
searchResult = []
|
||||||
previousSearches.append(searchTerm)
|
previousSearches = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
currentSearch = Task.detached {
|
currentSearch = Task.detached {
|
||||||
|
|||||||