From fbd710f9cffabe3d05247900357928f8247ee6fb Mon Sep 17 00:00:00 2001 From: davotoula Date: Sun, 27 Sep 2026 11:16:29 +0200 Subject: [PATCH] refactor(geocache): name the hunt's cache count instead of a let chain --- .../screen/loggedIn/geocaches/detail/GeocacheAddToHuntSheet.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geocaches/detail/GeocacheAddToHuntSheet.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geocaches/detail/GeocacheAddToHuntSheet.kt index 48fb28b80e..7028c9f23f 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geocaches/detail/GeocacheAddToHuntSheet.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geocaches/detail/GeocacheAddToHuntSheet.kt @@ -179,7 +179,8 @@ fun GeocacheAddToHuntSheet( if (already) { stringRes(Res.string.geocache_hunt_already_on) } else { - hunt.geocaches().size.let { pluralStringRes(Res.plurals.geocache_hunt_caches, it, it) } + val cacheCount = hunt.geocaches().size + pluralStringRes(Res.plurals.geocache_hunt_caches, cacheCount, cacheCount) }, style = MaterialTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant,