Use proper placeholder instead of 0 in image limit

This commit is contained in:
FooIbar committed 2024-04-29 16:29:46 +08:00
1 parent aca70354e7
commit 78002dac3a
1 file changed
+3 -5
@@ -150,11 +150,9 @@ fun EhScreen(navigator: DestinationsNavigator) {
var result by rememberSaveable { mutableStateOf<HomeParser.Result?>(null) }
var error by rememberSaveable { mutableStateOf<String?>(null) }
val summary by rememberUpdatedState(
stringResource(
id = R.string.image_limits_summary,
result?.run { limits.current } ?: 0,
result?.run { limits.maximum } ?: 0,
),
result?.run {
stringResource(id = R.string.image_limits_summary, limits.current, limits.maximum)
} ?: placeholder,
)
suspend fun getImageLimits() {
result = EhEngine.getImageLimits()