Fixed display of credit spending.

This commit is contained in:
23rd 2024-05-25 01:36:25 +03:00 committed by John Preston
parent 0549c8f037
commit 5defb9fb17
2 changed files with 2 additions and 2 deletions

View file

@ -769,7 +769,7 @@ void CreditsRow::init() {
_rightText.setText(
st::semiboldTextStyle,
(!_entry.bareId ? QChar('+') : kMinus)
+ Lang::FormatCountDecimal(_entry.credits));
+ Lang::FormatCountDecimal(std::abs(int64(_entry.credits))));
}
_paintUserpicCallback = !PeerListRow::special()
? PeerListRow::generatePaintUserpicCallback(false)

View file

@ -426,7 +426,7 @@ void ReceiptCreditsBox(
const auto text = lifetime.make_state<Ui::Text::String>(
st::semiboldTextStyle,
(!e.bareId ? QChar('+') : kMinus)
+ Lang::FormatCountDecimal(e.credits));
+ Lang::FormatCountDecimal(std::abs(int64(e.credits))));
const auto amount = content->add(
object_ptr<Ui::FixedHeightWidget>(