From 8ba96ca52765497ee387718c9d2215b32635904b Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 7 Aug 2025 16:39:44 -0400 Subject: [PATCH] Simplifies Zap animation sizes --- .../java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt | 6 +++--- .../amethyst/ui/screen/loggedIn/AccountViewModel.kt | 2 +- .../amethyst/ui/screen/loggedIn/video/VideoScreen.kt | 3 +-- .../main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt index 485d665cd..76927db46 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt @@ -135,7 +135,7 @@ import com.vitorpamplona.amethyst.ui.theme.ReactionRowHeightWithPadding import com.vitorpamplona.amethyst.ui.theme.ReactionRowZapraiser import com.vitorpamplona.amethyst.ui.theme.ReactionRowZapraiserWithPadding import com.vitorpamplona.amethyst.ui.theme.RowColSpacing -import com.vitorpamplona.amethyst.ui.theme.Size14dp +import com.vitorpamplona.amethyst.ui.theme.Size14Modifier import com.vitorpamplona.amethyst.ui.theme.Size18Modifier import com.vitorpamplona.amethyst.ui.theme.Size18dp import com.vitorpamplona.amethyst.ui.theme.Size19Modifier @@ -977,7 +977,7 @@ fun ZapReaction( accountViewModel: AccountViewModel, iconSize: Dp = Size20dp, iconSizeModifier: Modifier = Size20Modifier, - animationSize: Dp = Size14dp, + animationModifier: Modifier = Size14Modifier, nav: INav, ) { var wantsToZap by remember { mutableStateOf(false) } @@ -1108,7 +1108,7 @@ fun ZapReaction( CircularProgressIndicator( progress = { animatedProgress }, - modifier = remember { Modifier.size(animationSize) }, + modifier = animationModifier, strokeWidth = 2.dp, ) } else { diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt index 3939c9a8c..4005fbe69 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt @@ -658,7 +658,7 @@ class AccountViewModel( showErrorIfNoLnAddress = showErrorIfNoLnAddress, okHttpClient = ::okHttpClientForMoney, onError = onError, - onProgress = { onProgress(it) }, + onProgress = onProgress, onPayViaIntent = onPayViaIntent, zapType = zapType ?: defaultZapType(), ) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/VideoScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/VideoScreen.kt index 0d6e5aafe..e23281965 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/VideoScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/VideoScreen.kt @@ -93,7 +93,6 @@ import com.vitorpamplona.amethyst.ui.theme.HalfFeedPadding import com.vitorpamplona.amethyst.ui.theme.Size20Modifier import com.vitorpamplona.amethyst.ui.theme.Size22Modifier import com.vitorpamplona.amethyst.ui.theme.Size35Modifier -import com.vitorpamplona.amethyst.ui.theme.Size35dp import com.vitorpamplona.amethyst.ui.theme.Size40Modifier import com.vitorpamplona.amethyst.ui.theme.Size40dp import com.vitorpamplona.amethyst.ui.theme.Size55dp @@ -455,7 +454,7 @@ fun ReactionsColumn( accountViewModel = accountViewModel, iconSize = Size40dp, iconSizeModifier = Size40Modifier, - animationSize = Size35dp, + animationModifier = Size35Modifier, nav = nav, ) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt index ecae26927..752cb9ce3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt @@ -146,6 +146,7 @@ val MaxWidthWithHorzPadding = Modifier.fillMaxWidth().padding(horizontal = 10.dp val Size5Modifier = Modifier.size(5.dp) val Size10Modifier = Modifier.size(10.dp) +val Size14Modifier = Modifier.size(14.dp) val Size15Modifier = Modifier.size(15.dp) val Size16Modifier = Modifier.size(16.dp) val Size17Modifier = Modifier.size(17.dp)