commit 3908192fe22f9a6cb2eed6777201037ca486320f
parent 92020e551b4d803b840f2ddd39e7768251ffcd8d
Author: Suhail Saqan <suhail.saqan@gmail.com>
Date: Sat, 5 Aug 2023 12:09:45 -0500
reactions: add close button to custom reactions
Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Added: Add close button to custom reactions
Diffstat:
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift
@@ -290,6 +290,19 @@ struct LikeButton: View {
func reactions() -> some View {
HStack {
+ Button(action: {
+ withAnimation(.easeOut(duration: 0.2)) {
+ isReactionsVisible = false
+ showReactionsBG = 0
+ }
+ showEmojis = []
+ }) {
+ Image(systemName: "xmark.circle.fill")
+ .font(.body)
+ .foregroundColor(.gray)
+ }
+ .padding(.leading, 7.5)
+
ScrollView(.horizontal, showsIndicators: false) {
HStack(spacing: 20) {
ForEach(emojis, id: \.self) { emoji in
@@ -303,7 +316,7 @@ struct LikeButton: View {
}
}
}
- .padding(.horizontal, 20)
+ .padding(.trailing, 10)
}
}
}