mirror of
git://jb55.com/damus
synced 2024-09-18 19:23:49 +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:
parent
14586b616c
commit
1b1d4bd6d1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user