[Notifications] Ignore excess spam
ClosedPublic

Authored by broulik on Jun 25 2019, 10:39 AM.

Details

Summary

When multiple identical notifications are sent in quick succession, discard the request and let it fail.
Previously it would always replace the last notification if identical, now it discards the request and only does so if it happened within 1 second of the last notification to avoid discarding genuine identical notifications like when deleting two plasmoids of the same type.

BUG: 409157
FIXED-IN: 5.16.3

Test Plan
  • Called notify-send foo bar twice in quick succession: didn't get two dialogs
  • Waited a seconds inbetween, got two dialogs

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jun 25 2019, 10:39 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 25 2019, 10:39 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jun 25 2019, 10:39 AM
ngraham accepted this revision.Jun 25 2019, 3:08 PM
ngraham added a subscriber: ngraham.

I think this behavior makes perfect sense. Tested and it works properly. Code looks good too.

This revision is now accepted and ready to land.Jun 25 2019, 3:08 PM
This revision was automatically updated to reflect the committed changes.