Commit dad52613 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Reupload monitor configuration when reconnecting to NtfBus

Fixes issue with notifications not working properly after server
restart.
parent 37c639a1
......@@ -105,6 +105,32 @@ bool MonitorPrivate::connectToNotificationManager()
}
q_ptr->connect(ntfConnection, SIGNAL(commandReceived(qint64,Akonadi::Protocol::Command)),
q_ptr, SLOT(commandReceived(qint64,Akonadi::Protocol::Command)));
pendingModification = Protocol::ModifySubscriptionCommand();
for (const auto &col : collections) {
pendingModification.startMonitoringCollection(col.id());
}
for (const auto &res : resources) {
pendingModification.startMonitoringResource(res);
}
for (auto itemId : items) {
pendingModification.startMonitoringItem(itemId);
}
for (auto tagId : tags) {
pendingModification.startMonitoringTag(tagId);
}
for (auto type : types) {
pendingModification.startMonitoringType(static_cast<Protocol::ModifySubscriptionCommand::ChangeType>(type));
}
for (const auto &mimetype : mimetypes) {
pendingModification.startMonitoringMimeType(mimetype);
}
for (const auto &session : sessions) {
pendingModification.startIgnoringSession(session);
}
pendingModification.setAllMonitored(monitorAll);
pendingModification.setExclusive(exclusive);
ntfConnection->reconnect();
return 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