Commit 1b28d2a0 authored by Laurent Montel's avatar Laurent Montel 😁

Fix start/stop timer

parent 4ddff0ab
......@@ -74,10 +74,15 @@ ArchiveMailAgent::~ArchiveMailAgent()
void ArchiveMailAgent::setEnableAgent(bool enabled)
{
ArchiveMailAgentSettings::setEnabled(enabled);
ArchiveMailAgentSettings::self()->writeConfig();
if (!enabled) {
pause();
if (enabled != ArchiveMailAgentSettings::enabled()) {
ArchiveMailAgentSettings::setEnabled(enabled);
ArchiveMailAgentSettings::self()->writeConfig();
if (!enabled) {
mTimer->stop();
pause();
} else {
mTimer->start();
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment