From 5aacf867cdf22f7af662b1da9b6fc57918867c37 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 24 Jan 2020 10:31:18 +0300 Subject: [PATCH] Correctly apply 'min' updates in polls. --- Telegram/SourceFiles/data/data_poll.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/data/data_poll.cpp b/Telegram/SourceFiles/data/data_poll.cpp index f16a11840..977d614bb 100644 --- a/Telegram/SourceFiles/data/data_poll.cpp +++ b/Telegram/SourceFiles/data/data_poll.cpp @@ -168,13 +168,12 @@ bool PollData::applyResultToAnswers( answer->chosen = voters.is_chosen(); changed = true; } + } + if (!isMinResults || closed()) { if (answer->correct != voters.is_correct()) { answer->correct = voters.is_correct(); changed = true; } - } else if (const auto existing = answerByOption(option)) { - answer->chosen = existing->chosen; - answer->correct = existing->correct; } return changed; });