mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
[poll-view] Added toast when voting in hidden-results poll.
This commit is contained in:
@@ -6853,6 +6853,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_polls_results_in_days#other" = "results in {count} days";
|
||||
"lng_polls_ends_in_time" = "ends in {time}";
|
||||
"lng_polls_results_in_time" = "results in {time}";
|
||||
"lng_polls_results_after_close" = "Results will appear after the poll ends.";
|
||||
"lng_polls_retract" = "Retract vote";
|
||||
"lng_polls_stop" = "Stop poll";
|
||||
"lng_polls_stop_warning" = "If you stop this poll now, nobody will be able to vote in it anymore. This action cannot be undone.";
|
||||
|
||||
@@ -1331,6 +1331,13 @@ void Poll::updateVotes() {
|
||||
for (auto &answer : _answers) {
|
||||
answer.selected = false;
|
||||
}
|
||||
if (_votedFromHere
|
||||
&& (_flags & PollData::Flag::HideResultsUntilClose)
|
||||
&& !(_flags & PollData::Flag::Closed)) {
|
||||
_parent->delegate()->elementShowTooltip(
|
||||
{ tr::lng_polls_results_after_close(tr::now) },
|
||||
[] {});
|
||||
}
|
||||
} else {
|
||||
_votedFromHere = false;
|
||||
_hasSelected = false;
|
||||
|
||||
Reference in New Issue
Block a user