1
0
mirror of git://jb55.com/damus synced 2024-09-16 02:03:45 +00:00

perf: use plain images for actionbar buttons

The action bar is really slow to render for some reason, start
removing stuff
This commit is contained in:
William Casarin 2023-09-10 18:22:15 -07:00
parent 14586b616c
commit 1b1d4bd6d1

View File

@ -149,14 +149,15 @@ struct EventActionBar: View {
func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) -> some View {
Button(action: action) {
Image(img)
.resizable()
.foregroundColor(col == nil ? Color.gray : col!)
.font(.footnote.weight(.medium))
.aspectRatio(contentMode: .fit)
.frame(width: 20, height: 20)
}
Image(img)
.resizable()
.foregroundColor(col == nil ? Color.gray : col!)
.font(.footnote.weight(.medium))
.aspectRatio(contentMode: .fit)
.frame(width: 20, height: 20)
.onTapGesture {
action()
}
}
struct LikeButton: View {