Dynamically show and hide based on whether or not any vaults are configured
Summary:
Currently, the Vaults icon is always visible in the System Tray. However most tray icons
dynamically show and hide themselves based on whether or not they're relevant and in use,
which results in a nice clean clutter-free System Tray. So it would be nice for Vaults
to do the same.
This patch implements that behavior by making rowCount a property that gets updated
based on vault creation and deletion, and making the icon only appear in the tray when at
last one vault has been created. People who prefer to have it always visible can of course
override this in the System Tray settings, but the auto-hide behavior in this patch is probably
a better default for most.
Test Plan:
- Have no vaults -> icon is only in the popup
- Create a vault -> icon appears in the tray
- Delete the vault -> icon disappears from the tray and lives in the popup again
Reviewers: broulik, ivan, Plasma, VDG
Reviewed By: ivan, Plasma
Subscribers: plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D26447