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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user