mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix nice vote percents.
This commit is contained in:
parent
3dd2a6bb5b
commit
5ab1cd405a
2 changed files with 6 additions and 1 deletions
|
@ -6578,7 +6578,6 @@ void HistoryWidget::drawPinnedBar(Painter &p) {
|
|||
Expects(_pinnedBar != nullptr);
|
||||
|
||||
auto top = _topBar->bottomNoMargins();
|
||||
Text *from = 0, *text = 0;
|
||||
bool serviceColor = false, hasForward = readyToForward();
|
||||
ImagePtr preview;
|
||||
p.fillRect(myrtlrect(0, top, width(), st::historyReplyHeight), st::historyPinnedBg);
|
||||
|
|
|
@ -88,6 +88,12 @@ void AdjustPercentCount(gsl::span<PercentCounterItem> items, int left) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!items[i].remainder) {
|
||||
// If this item has correct value in 'percent' we don't want
|
||||
// to increment it to an incorrect one. This fixes a case with
|
||||
// four items with three votes for three different items.
|
||||
break;
|
||||
}
|
||||
const auto equal = j - i;
|
||||
if (equal <= left) {
|
||||
left -= equal;
|
||||
|
|
Loading…
Add table
Reference in a new issue