Important node also for other services.

This commit is contained in:
Martin Rotter 2020-06-10 14:51:34 +02:00
parent 69925d8f56
commit 2d571cc5d0
4 changed files with 15 additions and 2 deletions

View File

@ -191,6 +191,13 @@ void ServiceRoot::storeNewFeedTree(RootItem* root) {
appendChild(bin);
bin->updateCounts(true);
}
ImportantNode* imp = importantNode();
if (imp != nullptr && !childItems().contains(imp)) {
appendChild(imp);
imp->updateCounts(true);
}
}
}

View File

@ -23,6 +23,7 @@
#include "miscellaneous/databasequeries.h"
#include "miscellaneous/iconfactory.h"
#include "network-web/oauth2service.h"
#include "services/abstract/importantnode.h"
#include "services/abstract/recyclebin.h"
#include "services/inoreader/gui/formeditinoreaderaccount.h"
#include "services/inoreader/inoreaderentrypoint.h"
@ -58,6 +59,7 @@ void InoreaderServiceRoot::loadFromDatabase() {
// As the last item, add recycle bin, which is needed.
appendChild(recycleBin());
appendChild(importantNode());
updateCounts(true);
}
@ -186,7 +188,6 @@ void InoreaderServiceRoot::saveAllCachedData(bool async) {
while (j.hasNext()) {
j.next();
auto key = j.key();
QList<Message> messages = j.value();
if (!messages.isEmpty()) {

View File

@ -8,6 +8,7 @@
#include "miscellaneous/iconfactory.h"
#include "miscellaneous/mutex.h"
#include "miscellaneous/textfactory.h"
#include "services/abstract/importantnode.h"
#include "services/abstract/recyclebin.h"
#include "services/owncloud/gui/formeditowncloudaccount.h"
#include "services/owncloud/gui/formowncloudfeeddetails.h"
@ -34,6 +35,7 @@ bool OwnCloudServiceRoot::canBeDeleted() const {
bool OwnCloudServiceRoot::editViaGui() {
QScopedPointer<FormEditOwnCloudAccount> form_pointer(new FormEditOwnCloudAccount(qApp->mainFormWidget()));
form_pointer.data()->execForEdit(this);
return true;
}
@ -110,7 +112,6 @@ void OwnCloudServiceRoot::saveAllCachedData(bool async) {
while (j.hasNext()) {
j.next();
auto key = j.key();
QList<Message> messages = j.value();
if (!messages.isEmpty()) {
@ -173,6 +174,7 @@ void OwnCloudServiceRoot::addNewFeed(const QString& url) {
}
QScopedPointer<FormOwnCloudFeedDetails> form_pointer(new FormOwnCloudFeedDetails(this, qApp->mainFormWidget()));
form_pointer.data()->addEditFeed(nullptr, this, url);
qApp->feedUpdateLock()->unlock();
}
@ -201,5 +203,6 @@ void OwnCloudServiceRoot::loadFromDatabase() {
// As the last item, add recycle bin, which is needed.
appendChild(recycleBin());
appendChild(importantNode());
updateCounts(true);
}

View File

@ -9,6 +9,7 @@
#include "miscellaneous/settings.h"
#include "miscellaneous/textfactory.h"
#include "network-web/networkfactory.h"
#include "services/abstract/importantnode.h"
#include "services/abstract/recyclebin.h"
#include "services/tt-rss/definitions.h"
#include "services/tt-rss/gui/formeditttrssaccount.h"
@ -214,6 +215,7 @@ void TtRssServiceRoot::loadFromDatabase() {
// As the last item, add recycle bin, which is needed.
appendChild(recycleBin());
appendChild(importantNode());
updateCounts(true);
}