mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Add Stars/TON checks to suggestions.
This commit is contained in:
@@ -968,6 +968,15 @@ QString FormatCreditsAmountRounded(CreditsAmount amount) {
|
||||
return FormatExactCountDecimal(base::SafeRound(value * 100.) / 100.);
|
||||
}
|
||||
|
||||
QString FormatCreditsAmountWithCurrency(CreditsAmount amount) {
|
||||
return (amount.ton()
|
||||
? tr::lng_suggest_ton_amount
|
||||
: tr::lng_prize_credits_amount)(
|
||||
tr::now,
|
||||
lt_count_decimal,
|
||||
amount.value());
|
||||
}
|
||||
|
||||
PluralResult Plural(
|
||||
ushort keyBase,
|
||||
float64 value,
|
||||
|
||||
@@ -34,6 +34,8 @@ struct ShortenedCount {
|
||||
[[nodiscard]] QString FormatCreditsAmountDecimal(CreditsAmount amount);
|
||||
[[nodiscard]] QString FormatCreditsAmountRounded(CreditsAmount amount);
|
||||
|
||||
[[nodiscard]] QString FormatCreditsAmountWithCurrency(CreditsAmount amount);
|
||||
|
||||
struct PluralResult {
|
||||
int keyShift = 0;
|
||||
QString replacement;
|
||||
|
||||
Reference in New Issue
Block a user