From 72cb52e7436e3b4269c86c0cad7781361a56021b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Jan 2025 13:43:35 +0000 Subject: [PATCH] =?UTF-8?q?timeLimitsManager:=20Hide=20=E2=80=98limit=20re?= =?UTF-8?q?ached=E2=80=99=20notification=20when=20reset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the user changes their daily limit setting so that they’ve no longer reached their limit, remove the ‘limit reached’ notification from the message tray, if it’s still there, when disabling greyscale mode. Signed-off-by: Philip Withnall Helps: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8164 Part-of: --- js/misc/timeLimitsManager.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/misc/timeLimitsManager.js b/js/misc/timeLimitsManager.js index 5b709f733..20e774088 100644 --- a/js/misc/timeLimitsManager.js +++ b/js/misc/timeLimitsManager.js @@ -967,6 +967,9 @@ class TimeLimitsNotificationSource extends GObject.Object { console.debug(`TimeLimitsNotificationSource: ${remainingSecs}s left before limit is reached`); if (remainingSecs > LIMIT_UPCOMING_NOTIFICATION_TIME_SECONDS) { + this._notification?.destroy(); + this._notification = null; + // Schedule to show a notification when the upcoming notification // time is reached. this._scheduleUpdateState(remainingSecs - LIMIT_UPCOMING_NOTIFICATION_TIME_SECONDS);