bar: fix crash when long pressing emoji selection

Changelog-Fixed: Fix crash when long-pressing reactions
This commit is contained in:
William Casarin
2023-08-06 07:03:46 -07:00
parent 0178478199
commit 3098d4b4fa

View File

@@ -307,7 +307,7 @@ struct LikeButton: View {
HStack(spacing: 20) {
ForEach(emojis, id: \.self) { emoji in
if let index = emojis.firstIndex(of: emoji) {
let scale = showEmojis.count >= index + 1 ? showEmojis[index] : 0
let scale = index < showEmojis.count ? showEmojis[index] : 0
Text(emoji)
.scaleEffect(Double(scale))
.onTapGesture {