From dbff09d89bd9ed24de5b533fe9853e5e06cbb664 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 5 May 2026 13:18:59 +0400 Subject: [PATCH] Show "won" if got at least something. --- .../SourceFiles/history/view/media/history_view_dice.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_dice.cpp b/Telegram/SourceFiles/history/view/media/history_view_dice.cpp index 17120a6fe7..a2453a6151 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_dice.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_dice.cpp @@ -75,19 +75,20 @@ void Dice::updateOutcomeMessage() { ? forwarded->originalHiddenSenderInfo->name : from->name(); const auto out = (item->out() || from->isSelf()) && !forwarded; - const auto won = (_outcomeNanoTon - _outcomeStakeNanoTon); + const auto won = (_outcomeNanoTon > 0); + const auto displayNano = won ? _outcomeNanoTon : _outcomeStakeNanoTon; const auto amount = tr::marked(QString::fromUtf8("\xf0\x9f\x92\x8e") + " " - + QString::number(std::abs(won) / 1e9)); + + QString::number(displayNano / 1e9)); const auto text = out - ? (won >= 0 + ? (won ? tr::lng_action_stake_game_won_you : tr::lng_action_stake_game_lost_you)( tr::now, lt_amount, amount, tr::marked) - : (won >= 0 + : (won ? tr::lng_action_stake_game_won : tr::lng_action_stake_game_lost)( tr::now,