Commit 59c11c36 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make sure that we reload settings

parent e2f5852b
......@@ -59,7 +59,7 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
Kdelibs4ConfigMigrator migrate(QStringLiteral("newmailnotifieragent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_newmailnotifier_agentrc") << QStringLiteral("akonadi_newmailnotifier_agent.notifyrc"));
migrate.migrate();
connect(this, &Akonadi::AgentBase::reloadConfiguration, this, &NewMailNotifierAgent::reloadConfiguration);
KLocalizedString::setApplicationDomain("akonadi_newmailnotifier_agent");
Akonadi::AttributeFactory::registerAttribute<Akonadi::NewMailNotifierAttribute>();
new NewMailNotifierAdaptor(this);
......@@ -100,6 +100,11 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
}
}
void NewMailNotifierAgent::reloadConfiguration()
{
NewMailNotifierAgentSettings::self()->load();
}
void NewMailNotifierAgent::slotIdentitiesChanged()
{
mListEmails = mIdentityManager->allEmails();
......
......@@ -46,7 +46,7 @@ public:
explicit NewMailNotifierAgent(const QString &id);
void setEnableAgent(bool b);
bool enabledAgent() const;
Q_REQUIRED_RESULT bool enabledAgent() const;
void printDebug();
......@@ -71,6 +71,7 @@ private:
bool isActive() const;
void clearAll();
bool excludeSpecialCollection(const Akonadi::Collection &collection) const;
void reloadConfiguration();
QString mDefaultIconName;
QStringList mListEmails;
QHash<Akonadi::Collection, QList<Akonadi::Item::Id> > mNewMails;
......
......@@ -3,3 +3,4 @@ File=newmailnotifieragentsettings.kcfg
ClassName=NewMailNotifierAgentSettings
Mutators=true
Singleton=true
ItemAccessors=true
Supports Markdown
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