From c24436987563be41f065891985b3648f946c9ac6 Mon Sep 17 00:00:00 2001 From: Dude so hot Date: Sat, 19 Oct 2024 22:01:49 +0800 Subject: [PATCH] Apply RollingNumber to quota --- .../com/hippo/ehviewer/ui/main/AvatarIcon.kt | 17 ++++++++++------- app/src/main/res/values-zh-rCN/strings.xml | 2 +- app/src/main/res/values-zh-rTW/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/main/AvatarIcon.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/main/AvatarIcon.kt index 27db745a1..38fb95b3a 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/main/AvatarIcon.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/main/AvatarIcon.kt @@ -119,13 +119,16 @@ fun AvatarIcon() { modifier = Modifier.height(12.dp).fillMaxWidth(), ) } - Text( - text = when (limits.maximum) { - -1 -> stringResource(id = R.string.image_limits_restricted) - 0 -> stringResource(id = R.string.image_limits_normal) - else -> stringResource(id = R.string.image_limits_summary, limits.current, limits.maximum) - }, - ) + when (limits.maximum) { + -1 -> Text(text = stringResource(id = R.string.image_limits_restricted)) + 0 -> Text(text = stringResource(id = R.string.image_limits_normal)) + else -> Row(verticalAlignment = Alignment.CenterVertically) { + Text(text = stringResource(id = R.string.image_limits_summary)) + RollingNumber(number = limits.current) + Text(text = " / ") + RollingNumberPlaceholder(number = limits.maximum) + } + } Text(text = stringResource(id = R.string.current_funds)) Row( modifier = Modifier.fillMaxWidth(), diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 97367a764..e09dd009a 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -422,7 +422,7 @@ 当前资金: 余额不足 图片配额 - 已用:%1$d / %2$d + 已用: 无限制 图片分辨率限制为 1280x 花费 %d GP 重置 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index ab318758f..d0b209b24 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -418,7 +418,7 @@ 目前資金: 餘額不足 圖片配額 - 已用:%1$d / %2$d + 已用: 花費 %d GP 重置 重置 隱私 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1dac21430..ba8361b84 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -443,7 +443,7 @@ Current Funds: Insufficient Funds Image Limits - Used: %1$d / %2$d + Used: No restrictions Image resolution restricted to 1280x Spend %d GP to reset