Show/hide notifications as soon as charger is connected/disconnected

This commit is contained in:
Matti Viljanen 2020-06-14 17:43:08 +03:00
parent b2ff23aacc
commit 71b644e32d
No known key found for this signature in database
GPG key ID: CF32A1495158F888

View file

@ -126,6 +126,11 @@ void Battery::updateData()
state = nextState; state = nextState;
emit stateChanged(state); emit stateChanged(state);
qDebug() << "Charging status:" << state; qDebug() << "Charging status:" << state;
// Hide/show notification right away
showNotification();
// Reset the timer, too
updateConfig();
} }
stateFile->close(); stateFile->close();
} }