mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
Guarded repaint of special quick dialog actions that lead to de-listing.
This commit is contained in:
parent
838711e2ac
commit
bdf8a37a8f
1 changed files with 8 additions and 2 deletions
|
@ -1987,11 +1987,15 @@ bool InnerWidget::addQuickActionRipple(
|
|||
const auto size = QSize(
|
||||
st::dialogsQuickActionRippleSize,
|
||||
row->height());
|
||||
const auto isRemovingFromList
|
||||
= (action == Dialogs::Ui::QuickDialogAction::Archive);
|
||||
if (!context->ripple) {
|
||||
context->ripple = std::make_unique<Ui::RippleAnimation>(
|
||||
st::defaultRippleAnimation,
|
||||
Ui::RippleAnimation::RectMask(size),
|
||||
updateCallback);
|
||||
isRemovingFromList
|
||||
? Fn<void()>([=] { update(); })
|
||||
: updateCallback);
|
||||
}
|
||||
if (!context->rippleFg) {
|
||||
context->rippleFg = std::make_unique<Ui::RippleAnimation>(
|
||||
|
@ -2012,7 +2016,9 @@ bool InnerWidget::addQuickActionRipple(
|
|||
action,
|
||||
_filterId));
|
||||
}),
|
||||
std::move(updateCallback));
|
||||
isRemovingFromList
|
||||
? Fn<void()>([=] { update(); })
|
||||
: std::move(updateCallback));
|
||||
}
|
||||
context->ripple->add(QPoint(size.width() / 2, size.height() / 2));
|
||||
context->rippleFg->add(QPoint(size.width() / 2, size.height() / 2));
|
||||
|
|
Loading…
Add table
Reference in a new issue