This commit is contained in:
spaced4ndy
2026-08-15 00:44:37 +04:00
parent 9a115b7bc7
commit d14a3ba04a
3 changed files with 8 additions and 2 deletions
@@ -49,6 +49,11 @@ suspend fun loadBadgeProducts(productIds: List<String>): List<BadgeProduct> {
// does not have to be inferred from the id
val details = queryBadgeProducts(client, productIds, BillingClient.ProductType.INAPP) +
queryBadgeProducts(client, productIds, BillingClient.ProductType.SUBS)
if (details.size < productIds.size) {
// Play drops ids it cannot resolve without saying why, so the package it was asked for and the
// store country are logged with them - a debug build's applicationIdSuffix is a common cause
Log.w(TAG, "loadBadgeProducts: Play returned ${details.size} of ${productIds.size} - package ${androidAppContext.packageName}, country ${androidPlayStoreCountry.value ?: "none"}")
}
badgeProductDetails = details.associateBy { it.productId }
return details.mapNotNull { it.badgeProduct() }
}
@@ -163,7 +163,8 @@ private fun PeriodCard(level: BadgeLevel, period: BadgePeriod, selectedPeriod: B
val percent = savingsPercent(level, period)
if (percent != null) {
Text(
stringResource(MR.strings.badges_savings).format(percent),
// the percent sign is in the argument, not the resource: adjustFormatting rejects %%
stringResource(MR.strings.badges_savings).format("$percent%"),
style = MaterialTheme.typography.caption,
color = if (isSelected) MaterialTheme.colors.primary else MaterialTheme.colors.secondary,
textAlign = TextAlign.Center
@@ -3212,7 +3212,7 @@
<string name="badges_pay_once">Pay %1$s</string>
<string name="badges_price_loading">Loading…</string>
<string name="badges_price_unavailable">Not available</string>
<string name="badges_savings">Save %1$d%%</string>
<string name="badges_savings">Save %1$s</string>
<string name="badges_level_supporter_tagline">Optional profile badge\nand 2GB files</string>
<string name="badges_level_legend_tagline">Optional profile badge\nand 5GB files</string>
<string name="badges_period_one_month">1 month</string>