Skip to content

Commit

Permalink
Added amount of total voters to poll results with multiple answers.
Browse files Browse the repository at this point in the history
Fixed #28879.
  • Loading branch information
23rd committed Jan 26, 2025
1 parent 28a79bf commit db9e60b
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For license and copyright information please follow this link:
#include "ui/wrap/vertical_layout.h"
#include "ui/wrap/slide_wrap.h"
#include "ui/text/text_utilities.h"
#include "ui/vertical_list.h"
#include "boxes/peer_list_box.h"
#include "main/main_session.h"
#include "history/history.h"
Expand Down Expand Up @@ -610,11 +611,17 @@ void InnerWidget::setupContent() {
_content,
rpl::single(_poll->question),
st::pollResultsQuestion),
style::margins{
st::boxRowPadding.left(),
0,
st::boxRowPadding.right(),
st::boxMediumSkip });
st::boxRowPadding);
Ui::AddSkip(_content, st::boxLittleSkip / 2);
_content->add(
object_ptr<Ui::FlatLabel>(
_content,
tr::lng_polls_votes_count(
lt_count_decimal,
rpl::single(float64(_poll->totalVoters))),
st::boxDividerLabel),
st::boxRowPadding);
Ui::AddSkip(_content, st::boxLittleSkip);
for (const auto &answer : _poll->answers) {
const auto session = &_controller->session();
const auto controller = CreateAnswerRows(
Expand Down

0 comments on commit db9e60b

Please sign in to comment.