mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-04 16:45:12 +00:00
Fix notifications hiding on Linux.
Regression was introduced in 3372dfcd3e
.
Only when platform-specific code can give us the global time of the
last user input event we rely on idle time for notifications hiding.
Fixes #5791.
This commit is contained in:
@@ -586,7 +586,10 @@ void Notification::prepareActionsCache() {
|
||||
bool Notification::checkLastInput(bool hasReplyingNotifications) {
|
||||
if (!_waitingForInput) return true;
|
||||
|
||||
if (Core::App().lastNonIdleTime() > _started) {
|
||||
const auto waitForUserInput = Platform::LastUserInputTimeSupported()
|
||||
? (Core::App().lastNonIdleTime() <= _started)
|
||||
: false;
|
||||
if (!waitForUserInput) {
|
||||
_waitingForInput = false;
|
||||
if (!hasReplyingNotifications) {
|
||||
_hideTimer.start(st::notifyWaitLongHide);
|
||||
|
Reference in New Issue
Block a user