applets/notifications: suppress inhibited notifications after "Do not disturb" is off
Reason for the change
After leaving "Do not disturb" mode, a flood of on-screen notifications ensues, causing the right-hand side of the screen to be full of rapidly scrolling and disappearing notifications for the next minute.
The user doesn't need to see any notification popup that is suppressed by DnD mode, because the notification can be viewed from the drawer anyway.
This adds a new property in the Notification class named isAddedDuringInhibition
to track whether a notification is received during inhibition. When leaving DnD mode, inhibited notifications will be ignored by checking the property.
Test plan
- Enable DnD
- Create a notification using KDE Connect
- Disable DnD, and a summary notification is shown
- Enable always show notifications for KDE Connect in the notification settings
- Repeat 1 and 2, and a notification is shown
Screenshots or screen recordings
Bugs fixed
BUG: 440837 FIXED-IN: 6.3
Edited by Fushan Wen