[Notifications] Improve self-closing behavior

Authored by broulik on Dec 20 2019, 8:59 AM.

Description

[Notifications] Improve self-closing behavior

When a plasmoid collapses in Active state, the popup is hidden.
In Passive state, however, one is returned to the hidden items list, as it cannot tell whether
the plasmoid collapsed on its own or because the user clicked the same one in the hidden items list again.
When we clear notifications, plasmoid state updates immediately as a result of model signals,
and when we then try to collapse the plasmoid we're already hidden and just returned to the hidden items list.

This patch addresses this by delaying the state change slightly.
Futhermore, don't collapse the plasmoid when already hidden as that would just return the user to the hidden items list.

Differential Revision: https://phabricator.kde.org/D26091

Details

Committed
broulikDec 20 2019, 8:59 AM
Differential Revision
D26091: [Notifications] Improve self-closing behavior
Parents
R120:146865ac17e0: GIT_SILENT: Port deprecated QSet::toList method
Branches
Unknown
Tags
Unknown