Save cache before feed update.
This commit is contained in:
parent
0814528e03
commit
d7ba368a02
5 changed files with 8 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
3.5.1
|
||||||
|
—————
|
||||||
|
|
||||||
|
Added:
|
||||||
|
▪ Inoreader plugin can mark messages starred.
|
||||||
|
▪ All cached online service data are synchronously saved when any feed is updated.
|
||||||
|
|
||||||
3.5.0
|
3.5.0
|
||||||
—————
|
—————
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ void FeedDownloader::updateAvailableFeeds() {
|
||||||
foreach (const Feed* feed, m_feeds) {
|
foreach (const Feed* feed, m_feeds) {
|
||||||
CacheForServiceRoot* cache = dynamic_cast<CacheForServiceRoot*>(feed->getParentServiceRoot());
|
CacheForServiceRoot* cache = dynamic_cast<CacheForServiceRoot*>(feed->getParentServiceRoot());
|
||||||
|
|
||||||
if (cache != nullptr && caches.contains(cache)) {
|
if (cache != nullptr && !caches.contains(cache)) {
|
||||||
caches.append(cache);
|
caches.append(cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,10 +166,6 @@ void InoreaderServiceRoot::addNewFeed(const QString& url) {
|
||||||
void InoreaderServiceRoot::addNewCategory() {}
|
void InoreaderServiceRoot::addNewCategory() {}
|
||||||
|
|
||||||
void InoreaderServiceRoot::saveAllCachedData(bool async) {
|
void InoreaderServiceRoot::saveAllCachedData(bool async) {
|
||||||
Q_UNUSED(async)
|
|
||||||
|
|
||||||
// TODO: implementovat toto, aby bylo možno ukládat data i synchronně
|
|
||||||
|
|
||||||
QPair<QMap<RootItem::ReadStatus, QStringList>, QMap<RootItem::Importance, QList<Message>>> msgCache = takeMessageCache();
|
QPair<QMap<RootItem::ReadStatus, QStringList>, QMap<RootItem::Importance, QList<Message>>> msgCache = takeMessageCache();
|
||||||
QMapIterator<RootItem::ReadStatus, QStringList> i(msgCache.first);
|
QMapIterator<RootItem::ReadStatus, QStringList> i(msgCache.first);
|
||||||
|
|
||||||
|
|
|
@ -107,10 +107,6 @@ OwnCloudNetworkFactory* OwnCloudServiceRoot::network() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OwnCloudServiceRoot::saveAllCachedData(bool async) {
|
void OwnCloudServiceRoot::saveAllCachedData(bool async) {
|
||||||
Q_UNUSED(async)
|
|
||||||
|
|
||||||
// TODO: implementovat toto, aby bylo možno ukládat data i synchronně
|
|
||||||
|
|
||||||
QPair<QMap<RootItem::ReadStatus, QStringList>, QMap<RootItem::Importance, QList<Message>>> msgCache = takeMessageCache();
|
QPair<QMap<RootItem::ReadStatus, QStringList>, QMap<RootItem::Importance, QList<Message>>> msgCache = takeMessageCache();
|
||||||
QMapIterator<RootItem::ReadStatus, QStringList> i(msgCache.first);
|
QMapIterator<RootItem::ReadStatus, QStringList> i(msgCache.first);
|
||||||
|
|
||||||
|
|
|
@ -126,10 +126,6 @@ bool TtRssServiceRoot::canBeDeleted() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TtRssServiceRoot::saveAllCachedData(bool async) {
|
void TtRssServiceRoot::saveAllCachedData(bool async) {
|
||||||
Q_UNUSED(async)
|
|
||||||
|
|
||||||
// TODO: implementovat toto, aby bylo možno ukládat data i synchronně
|
|
||||||
|
|
||||||
QPair<QMap<RootItem::ReadStatus, QStringList>, QMap<RootItem::Importance, QList<Message>>> msgCache = takeMessageCache();
|
QPair<QMap<RootItem::ReadStatus, QStringList>, QMap<RootItem::Importance, QList<Message>>> msgCache = takeMessageCache();
|
||||||
QMapIterator<RootItem::ReadStatus, QStringList> i(msgCache.first);
|
QMapIterator<RootItem::ReadStatus, QStringList> i(msgCache.first);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue