commit 50d55572be1d295a79be3cf0e6e87448ce004cdf
parent caffa0398b469d189d37f87f15d80a296c45a508
Author: William Casarin <jb55@jb55.com>
Date: Mon, 28 Aug 2023 08:00:03 -0700
Fix crash when long pressing custom reactions
Changelog-Fixed: Fix crash when long pressing custom reactions
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift
@@ -329,7 +329,9 @@ struct LikeButton: View {
for (index, _) in emojis.enumerated() {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1 * Double(index)) {
withAnimation(.interpolatingSpring(stiffness: 170, damping: 8)) {
- showEmojis[index] = 1
+ if index < showEmojis.count {
+ showEmojis[index] = 1
+ }
}
}
}