feat: clean all notifications if exit on linux

This commit is contained in:
ShootingStarDragons 2023-01-29 13:46:00 +08:00
parent 3abb49c4a2
commit 919ec2a5e3
5 changed files with 33 additions and 1 deletions

View file

@ -271,3 +271,12 @@ NotificationsManager::notificationClosed(uint id, uint reason)
Q_UNUSED(reason);
notificationIds.remove(id);
}
void
NotificationsManager::closeAllNotifications()
{
for (auto id : notificationIds.keys()) {
closeNotification(id);
notificationIds.remove(id);
}
}