From 9f65e14adba1ca5843798e9c697131c343a21529 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 3 Jan 2026 23:29:53 +0400 Subject: [PATCH] Fix incorrect stake message appearance. --- .../SourceFiles/history/view/media/history_view_dice.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_dice.cpp b/Telegram/SourceFiles/history/view/media/history_view_dice.cpp index a17df12198..93eed91e1f 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_dice.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_dice.cpp @@ -70,14 +70,14 @@ void Dice::updateOutcomeMessage() { + " " + QString::number(std::abs(won) / 1e9)); const auto text = out - ? (won > 0 + ? (won >= 0 ? tr::lng_action_stake_game_won_you : tr::lng_action_stake_game_lost_you)( tr::now, lt_amount, amount, tr::marked) - : (won > 0 + : (won >= 0 ? tr::lng_action_stake_game_won : tr::lng_action_stake_game_lost)( tr::now, @@ -117,7 +117,9 @@ bool Dice::updateItemData() { _outcomeNanoTon = outcomeNanoTon; _outcomeStakeNanoTon = outcomeStakeNanoTon; _outcomeValue = outcomeValue; - updateOutcomeMessage(); + if (_outcomeSet) { + updateOutcomeMessage(); + } return true; }