mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +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(
|
const auto size = QSize(
|
||||||
st::dialogsQuickActionRippleSize,
|
st::dialogsQuickActionRippleSize,
|
||||||
row->height());
|
row->height());
|
||||||
|
const auto isRemovingFromList
|
||||||
|
= (action == Dialogs::Ui::QuickDialogAction::Archive);
|
||||||
if (!context->ripple) {
|
if (!context->ripple) {
|
||||||
context->ripple = std::make_unique<Ui::RippleAnimation>(
|
context->ripple = std::make_unique<Ui::RippleAnimation>(
|
||||||
st::defaultRippleAnimation,
|
st::defaultRippleAnimation,
|
||||||
Ui::RippleAnimation::RectMask(size),
|
Ui::RippleAnimation::RectMask(size),
|
||||||
updateCallback);
|
isRemovingFromList
|
||||||
|
? Fn<void()>([=] { update(); })
|
||||||
|
: updateCallback);
|
||||||
}
|
}
|
||||||
if (!context->rippleFg) {
|
if (!context->rippleFg) {
|
||||||
context->rippleFg = std::make_unique<Ui::RippleAnimation>(
|
context->rippleFg = std::make_unique<Ui::RippleAnimation>(
|
||||||
|
@ -2012,7 +2016,9 @@ bool InnerWidget::addQuickActionRipple(
|
||||||
action,
|
action,
|
||||||
_filterId));
|
_filterId));
|
||||||
}),
|
}),
|
||||||
std::move(updateCallback));
|
isRemovingFromList
|
||||||
|
? Fn<void()>([=] { update(); })
|
||||||
|
: std::move(updateCallback));
|
||||||
}
|
}
|
||||||
context->ripple->add(QPoint(size.width() / 2, size.height() / 2));
|
context->ripple->add(QPoint(size.width() / 2, size.height() / 2));
|
||||||
context->rippleFg->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