Close notification early, once only

This commit is contained in:
Matti Viljanen 2021-04-26 17:36:02 +03:00
parent 1a0b730a1c
commit ac1e735d26
No known key found for this signature in database
GPG key ID: CF32A1495158F888
2 changed files with 3 additions and 6 deletions

View file

@ -252,13 +252,13 @@ bool Battery::getChargerConnected() {
} }
void Battery::shutdown() { void Battery::shutdown() {
logV("Service shut down..."); logV("Shutting down...");
notification->close();
blockSignals(true); blockSignals(true);
if(updateTimer) { if(updateTimer) {
updateTimer->stop(); updateTimer->stop();
logD("Update timer stopped"); logD("Update timer stopped");
} }
notification->close();
if(highNotifyTimer) { if(highNotifyTimer) {
highNotifyTimer->stop(); highNotifyTimer->stop();
logD("High battery notification stopped"); logD("High battery notification stopped");

View file

@ -24,10 +24,7 @@ MyNotification::MyNotification(QObject* parent) : QObject(parent)
notification.setAppIcon("harbour-batterybuddy"); notification.setAppIcon("harbour-batterybuddy");
} }
MyNotification::~MyNotification() MyNotification::~MyNotification() { }
{
notification.close();
}
void MyNotification::send(QString title, QString body, QString soundFile) void MyNotification::send(QString title, QString body, QString soundFile)
{ {