Fix image overflow, fix slow marking read/unread in nextcloud categories which contain MANY feeds.

This commit is contained in:
Martin Rotter 2017-07-08 10:15:41 +02:00
parent f6ad603828
commit 6ede648ac8
6 changed files with 26 additions and 1 deletions

View File

@ -7233,6 +7233,10 @@ a.list-group-item-danger.active:focus {
.card-block {
padding: .4rem;
}
img {
max-height: 80%;
max-width: 80%;
}
</style>

View File

@ -5929,6 +5929,10 @@
.card-block {
padding: .4rem;
}
img {
max-height: 80%;
max-width: 80%;
}
</style>

View File

@ -224,7 +224,6 @@ void FeedReader::checkServicesForAsyncOperations(bool wait_for_future) {
if (m_cacheSaveFutureWatcher->future().isRunning()) {
qDebug("Previous future is still running.");
// If we want to wait for future synchronously, we want to make sure that
// we save all cached data (app exit).
if (wait_for_future) {

View File

@ -58,6 +58,7 @@ class FeedReader : public QObject {
// Schedules given feeds for update.
void updateFeeds(const QList<Feed*> &feeds);
// True if feed update is running right now.
bool isFeedUpdateRunning() const;
// Resets global auto-update intervals according to settings

View File

@ -17,6 +17,7 @@
#include "services/owncloud/owncloudcategory.h"
#include "services/owncloud/owncloudserviceroot.h"
#include "miscellaneous/application.h"
#include "miscellaneous/iconfactory.h"
@ -33,5 +34,14 @@ OwnCloudCategory::OwnCloudCategory(const QSqlRecord &record) : Category(nullptr)
setCustomId(record.value(CAT_DB_CUSTOM_ID_INDEX).toInt());
}
OwnCloudServiceRoot *OwnCloudCategory::serviceRoot() const {
return qobject_cast<OwnCloudServiceRoot*>(getParentServiceRoot());
}
bool OwnCloudCategory::markAsReadUnread(RootItem::ReadStatus status) {
serviceRoot()->addMessageStatesToCache(getParentServiceRoot()->customIDSOfMessagesForItem(this), status);
return serviceRoot()->markFeedsReadUnread(getSubTreeFeeds(), status);
}
OwnCloudCategory::~OwnCloudCategory() {
}

View File

@ -21,6 +21,8 @@
#include "services/abstract/category.h"
class OwnCloudServiceRoot;
class OwnCloudCategory : public Category {
Q_OBJECT
@ -28,6 +30,11 @@ class OwnCloudCategory : public Category {
explicit OwnCloudCategory(RootItem *parent = nullptr);
explicit OwnCloudCategory(const QSqlRecord &record);
virtual ~OwnCloudCategory();
bool markAsReadUnread(ReadStatus status);
private:
OwnCloudServiceRoot *serviceRoot() const;
};
#endif // OWNCLOUDSERVICECATEGORY_H