damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 0350809e82140b741ba695d9be41c2f7c081533b
parent cddb88b8901e8d0bf23e31540bdc1322833422dc
Author: Suhail Saqan <suhail.saqan@gmail.com>
Date:   Sat,  5 Aug 2023 15:00:04 -0500

bar: fix reaction button breaking scrolling

Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Fixed: Fix reaction button breaking scrolling

Diffstat:
Mdamus/Views/ActionBar/EventActionBar.swift | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift @@ -205,19 +205,20 @@ struct LikeButton: View { shakaAnimationLogic() } .simultaneousGesture(longPressGesture()) + .highPriorityGesture(TapGesture().onEnded { + guard !isReactionsVisible else { return } + withAnimation(Animation.easeOut(duration: 0.15)) { + self.action(damus_state.settings.default_emoji_reaction) + shouldAnimate = true + amountOfAngleIncrease = 20.0 + } + }) .overlay(reactionsOverlay()) } } func likeButton() -> some View { - Button(action: { - guard !isReactionsVisible else { return } - withAnimation(Animation.easeOut(duration: 0.15)) { - self.action(damus_state.settings.default_emoji_reaction) - shouldAnimate = true - amountOfAngleIncrease = 20.0 - } - }) { + Group { if let liked_emoji { buildMaskView(for: liked_emoji) .frame(width: 20, height: 20)