Added decimal separators to count of credits in balances of owned bot.

This commit is contained in:
23rd 2024-10-28 17:46:42 +03:00
parent 119f109904
commit 057222757b
3 changed files with 4 additions and 4 deletions
Telegram/SourceFiles

View file

@ -1664,7 +1664,7 @@ void Controller::fillBotCreditsButton() {
auto &lifetime = _controls.buttonsLayout->lifetime();
const auto state = lifetime.make_state<State>();
if (const auto balance = _peer->session().credits().balance(_peer->id)) {
state->balance = QString::number(balance);
state->balance = Lang::FormatCountDecimal(balance);
}
const auto wrap = _controls.buttonsLayout->add(
@ -1689,7 +1689,7 @@ void Controller::fillBotCreditsButton() {
if (data.balance) {
wrap->toggle(true, anim::type::normal);
}
state->balance = QString::number(data.balance);
state->balance = Lang::FormatCountDecimal(data.balance);
});
}
{

View file

@ -124,7 +124,7 @@ void InnerWidget::fill() {
return _state.availableBalance;
})
);
auto valueToString = [](uint64 v) { return QString::number(v); };
auto valueToString = [](uint64 v) { return Lang::FormatCountDecimal(v); };
if (data.revenueGraph.chart) {
Ui::AddSkip(container);

View file

@ -926,7 +926,7 @@ rpl::producer<uint64> AddCreditsAction(
name->setMarkedText(
base::duplicate(icon)
.append(QChar(' '))
.append(QString::number(balance)),
.append(Lang::FormatCountDecimal(balance)),
Core::MarkedTextContext{
.session = &user->session(),
.customEmojiRepaint = [=] { name->update(); },