diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp index f5029df3a7..3e15b0c071 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp @@ -932,12 +932,6 @@ void PaintRow( context.width, text); } else if (from) { - auto badgeWidth = 0; - if ((history || sublist) && !context.search) { - const auto widthBefore = rectForName.width(); - paintPeerBadge(rowName.maxWidth()); - badgeWidth = widthBefore - rectForName.width(); - } const auto drawMuteIcon = DialogsMuteIcon.value() && thread && thread->muted(); @@ -951,6 +945,12 @@ void PaintRow( - muteIcon.width() - st::dialogsMuteIconSkip); } + auto badgeWidth = 0; + if ((history || sublist) && !context.search) { + const auto widthBefore = rectForName.width(); + paintPeerBadge(rowName.maxWidth()); + badgeWidth = widthBefore - rectForName.width(); + } p.setPen(context.active ? st::dialogsNameFgActive : context.selected