Commit 61c99899 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Show mbox resource number

parent 88b504b4
Pipeline #66286 passed with stage
in 23 minutes and 25 seconds
......@@ -35,6 +35,7 @@ QVariant AccountInfoSource::data()
int numberOfKolab = 0;
int numberOfEws = 0;
int numberOfMaildir = 0;
int numberOfMbox = 0;
for (const Akonadi::AgentInstance &type : lst) {
const QString identifier = type.identifier();
if (identifier.startsWith(QLatin1String("akonadi_pop3_resource"))) {
......@@ -47,6 +48,8 @@ QVariant AccountInfoSource::data()
numberOfEws++;
} else if (identifier.startsWith(QLatin1String("akonadi_maildir_resource"))) {
numberOfMaildir++;
} else if (identifier.startsWith(QLatin1String("akonadi_mbox_resource"))) {
numberOfMbox++;
}
// TODO add more
}
......@@ -81,6 +84,12 @@ QVariant AccountInfoSource::data()
m.insert(QStringLiteral("number"), numberOfMaildir);
l.push_back(m);
}
if (numberOfMbox > 0) {
QVariantMap m;
m.insert(QStringLiteral("name"), QStringLiteral("mbox"));
m.insert(QStringLiteral("number"), numberOfMbox);
l.push_back(m);
}
// Mail Transport
QVariantMap m;
......
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