Skip to content

fix: notify about missed notifications only once

Reason for the change

There is an issue where the summary about notifications missed while in "Do Not Disturb" mode is shown unconditionally so long as those notifications are unread, when we come out of Do Not Disturb mode.

This means that if the user toggles Do Not Disturb mode on and off multiple times, they will see the summary multiple times, even if it was shown only seconds ago.

This has become apparent since we are now properly using Do Not Disturb for fullscreen windows, and so this bug causes the summary to be shown every time we come out of fullscreen mode (even for a moment) if there are unread notifications that were delivered while in Do Not Disturb mode.

We fix the issue by marking the affected notifications that we have already informed the user they were missed, so we don't repeat, and only show if there are new notifications since the last summary.

Test plan

In a dev session:

  • Ensure the While a fullscreen application is focused setting in notification settings is enabled
  • Open a Konsole window
  • Toggle fullscreen and not by pressing F11 twice (in a fresh session, there should be no missed notifications summary)
  • Toggle back to fullscreen
  • Send a test notification from this fullscreen Konsole window with notify-send --hint=string:desktop-entry:org.kde.dolphin -i dialog-information "hi"
  • Leave fullscreen with F11 (there should be a missed notifications summary)
  • Toggle fullscreen on/off again (there should not be any further summary notifications about the test notification)

CC @broulik @ngraham

Edited by Kristen McWilliam

Merge request reports

Loading