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