mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Fix multiple answers polls voting.
This commit is contained in:
@@ -2196,7 +2196,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
"lng_polls_create_settings" = "Settings";
|
"lng_polls_create_settings" = "Settings";
|
||||||
"lng_polls_create_hint" = "Tap to select the right option";
|
"lng_polls_create_hint" = "Tap to select the right option";
|
||||||
"lng_polls_create_anonymous" = "Anonymous Votes";
|
"lng_polls_create_anonymous" = "Anonymous Votes";
|
||||||
"lng_polls_create_multiple_choice" = "Multiple Choice";
|
"lng_polls_create_multiple_choice" = "Multiple Answers";
|
||||||
"lng_polls_create_quiz_mode" = "Quiz Mode";
|
"lng_polls_create_quiz_mode" = "Quiz Mode";
|
||||||
"lng_polls_create_button" = "Create";
|
"lng_polls_create_button" = "Create";
|
||||||
|
|
||||||
|
@@ -937,3 +937,16 @@ pollResultsVotesCount: FlatLabel(defaultFlatLabel) {
|
|||||||
textFg: windowSubTextFg;
|
textFg: windowSubTextFg;
|
||||||
}
|
}
|
||||||
pollResultsHeaderPadding: margins(22px, 8px, 22px, 8px);
|
pollResultsHeaderPadding: margins(22px, 8px, 22px, 8px);
|
||||||
|
pollResultsShowMore: SettingsButton {
|
||||||
|
textFg: lightButtonFg;
|
||||||
|
textFgOver: lightButtonFgOver;
|
||||||
|
textBg: windowBg;
|
||||||
|
textBgOver: windowBgOver;
|
||||||
|
|
||||||
|
font: semiboldFont;
|
||||||
|
|
||||||
|
height: 20px;
|
||||||
|
padding: margins(71px, 10px, 8px, 8px);
|
||||||
|
|
||||||
|
ripple: defaultRippleAnimation;
|
||||||
|
}
|
||||||
|
@@ -277,7 +277,7 @@ void CreateAnswerRows(
|
|||||||
lt_count_decimal,
|
lt_count_decimal,
|
||||||
rpl::single(answer.votes + 0.),
|
rpl::single(answer.votes + 0.),
|
||||||
Ui::Text::Upper),
|
Ui::Text::Upper),
|
||||||
st::infoMainButton)),
|
st::pollResultsShowMore)),
|
||||||
style::margins());
|
style::margins());
|
||||||
more->toggle(answer.votes > kFirstPage, anim::type::instant);
|
more->toggle(answer.votes > kFirstPage, anim::type::instant);
|
||||||
more->entity()->setClickedCallback([=] {
|
more->entity()->setClickedCallback([=] {
|
||||||
|
@@ -256,11 +256,8 @@ bool Poll::canSendVotes() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Poll::showVotersCount() const {
|
bool Poll::showVotersCount() const {
|
||||||
if (!_totalVotes) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return showVotes()
|
return showVotes()
|
||||||
? !(_flags & PollData::Flag::PublicVotes)
|
? (!_totalVotes || !(_flags & PollData::Flag::PublicVotes))
|
||||||
: !(_flags & PollData::Flag::MultiChoice);
|
: !(_flags & PollData::Flag::MultiChoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user