commit 1b1d4bd6d1e3b53c2986dfbee4cad53b9e992d64
parent 14586b616cad45fb61cc3948c2fa9ec66ddfdb08
Author: William Casarin <jb55@jb55.com>
Date: Sun, 10 Sep 2023 18:22:15 -0700
perf: use plain images for actionbar buttons
The action bar is really slow to render for some reason, start
removing stuff
Diffstat:
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift
@@ -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 {