mirror of https://github.com/procxx/kepka.git
Fix multiple answers polls voting.
This commit is contained in:
parent
3e0b2f5553
commit
c3aa2abe11
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue