Merge pull request #3042 from vitorpamplona/claude/reaction-row-padding-bug-DaQO0

Fix reaction row layout for icon-only rightmost items
This commit is contained in:
Vitor Pamplona
2026-05-23 17:09:55 -04:00
committed by GitHub
@@ -404,9 +404,14 @@ private fun GenericInnerReactionRow(
}
enabledReactions.forEachIndexed { index, item ->
val isLast = index == lastIndex
// Skip the weighted slice for the rightmost item only when it has no counter
// (e.g. Share / Pay) — those are icon-only, so letting them collapse to natural
// width pins them flush against the right padding. If the rightmost item carries
// a counter (Zap / Like / etc.), keep it weighted so its icon stays at the left
// of an equal-width slice and the counter doesn't get pushed to the edge.
val isLastIconOnly = index == lastIndex && !item.showCounter
val itemWeight = if (item.action == ReactionRowAction.Reply) weightTwo else 1f
val mod = if (isLast) Modifier else Modifier.weight(itemWeight)
val mod = if (isLastIconOnly) Modifier else Modifier.weight(itemWeight)
Row(
verticalAlignment = CenterVertically,
horizontalArrangement = RowColSpacing,