From e3f2dcec22d9ddc60381eac21362fc1b03d288c6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 7 Apr 2023 15:17:24 +0400 Subject: [PATCH] Fix userpic glitch in folder chats lists. --- Telegram/SourceFiles/boxes/filters/edit_filter_links.cpp | 7 +++---- Telegram/SourceFiles/ui/effects/round_checkbox.cpp | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/boxes/filters/edit_filter_links.cpp b/Telegram/SourceFiles/boxes/filters/edit_filter_links.cpp index dd6c86309..161093867 100644 --- a/Telegram/SourceFiles/boxes/filters/edit_filter_links.cpp +++ b/Telegram/SourceFiles/boxes/filters/edit_filter_links.cpp @@ -356,16 +356,15 @@ PaintRoundImageCallback ChatRow::generatePaintUserpicCallback( peer->paintUserpicLeft(p, userpic, x, y, outerWidth, size); } }; + if (!_disabled) { + return paint; + } return [=]( Painter &p, int x, int y, int outerWidth, int size) mutable { - if (!_disabled) { - paint(p, x, y, outerWidth, size); - return; - } const auto wide = size + style::ConvertScale(3); const auto full = QSize(wide, wide) * style::DevicePixelRatio(); auto repaint = false; diff --git a/Telegram/SourceFiles/ui/effects/round_checkbox.cpp b/Telegram/SourceFiles/ui/effects/round_checkbox.cpp index 02158cef6..74c51e144 100644 --- a/Telegram/SourceFiles/ui/effects/round_checkbox.cpp +++ b/Telegram/SourceFiles/ui/effects/round_checkbox.cpp @@ -429,6 +429,7 @@ void RoundImageCheckbox::setChecked(bool newChecked, anim::type animated) { if (!changed) { if (animated == anim::type::instant) { _selection.stop(); + _wideCache = QPixmap(); } return; } @@ -451,6 +452,7 @@ void RoundImageCheckbox::setChecked(bool newChecked, anim::type animated) { anim::bumpy(1.25)); } else { _selection.stop(); + _wideCache = QPixmap(); } }