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 { func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) -> some View {
Button(action: action) { Image(img)
Image(img) .resizable()
.resizable() .foregroundColor(col == nil ? Color.gray : col!)
.foregroundColor(col == nil ? Color.gray : col!) .font(.footnote.weight(.medium))
.font(.footnote.weight(.medium)) .aspectRatio(contentMode: .fit)
.aspectRatio(contentMode: .fit) .frame(width: 20, height: 20)
.frame(width: 20, height: 20) .onTapGesture {
} action()
}
} }
struct LikeButton: View { struct LikeButton: View {