mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Manager::startAllHiding
: don't treat fading in notifications specially
Previously, `Window::Notifications::Default::Manager` would not start hiding notifications that are fading in when other notifications should hide. This would lead to some notifications never hiding, e.g., when the cursor passes through the notification too quickly and there was not enough time for the notification to fade in completely. Also renamed `Widget::isShowing` -> `Widget::isFadingIn` for clarity. Fixes #28811.
This commit is contained in:
parent
ef859d77e9
commit
7f6221b409
2 changed files with 3 additions and 9 deletions
|
@ -188,16 +188,10 @@ void Manager::checkLastInput() {
|
|||
|
||||
void Manager::startAllHiding() {
|
||||
if (!hasReplyingNotification()) {
|
||||
int notHidingCount = 0;
|
||||
for (const auto ¬ification : _notifications) {
|
||||
if (notification->isShowing()) {
|
||||
++notHidingCount;
|
||||
} else {
|
||||
notification->startHiding();
|
||||
}
|
||||
notification->startHiding();
|
||||
}
|
||||
notHidingCount += _queuedNotifications.size();
|
||||
if (_hideAll && notHidingCount < 2) {
|
||||
if (_hideAll && _queuedNotifications.size() < 2) {
|
||||
_hideAll->startHiding();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ public:
|
|||
int shift,
|
||||
Direction shiftDirection);
|
||||
|
||||
bool isShowing() const {
|
||||
bool isFadingIn() const {
|
||||
return _a_opacity.animating() && !_hiding;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue