Skip to content

Commit 9f65e14

Browse files
committed
Fix incorrect stake message appearance.
1 parent a05d7aa commit 9f65e14

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Telegram/SourceFiles/history/view/media/history_view_dice.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ void Dice::updateOutcomeMessage() {
7070
+ " "
7171
+ QString::number(std::abs(won) / 1e9));
7272
const auto text = out
73-
? (won > 0
73+
? (won >= 0
7474
? tr::lng_action_stake_game_won_you
7575
: tr::lng_action_stake_game_lost_you)(
7676
tr::now,
7777
lt_amount,
7878
amount,
7979
tr::marked)
80-
: (won > 0
80+
: (won >= 0
8181
? tr::lng_action_stake_game_won
8282
: tr::lng_action_stake_game_lost)(
8383
tr::now,
@@ -117,7 +117,9 @@ bool Dice::updateItemData() {
117117
_outcomeNanoTon = outcomeNanoTon;
118118
_outcomeStakeNanoTon = outcomeStakeNanoTon;
119119
_outcomeValue = outcomeValue;
120-
updateOutcomeMessage();
120+
if (_outcomeSet) {
121+
updateOutcomeMessage();
122+
}
121123
return true;
122124
}
123125

0 commit comments

Comments
 (0)