mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-25 13:38:44 +01:00
Save cached data before feed update too.
This commit is contained in:
parent
a2e1043d85
commit
49f76775f4
@ -160,6 +160,9 @@ void Feed::run() {
|
||||
<< customId() << " in thread: \'"
|
||||
<< QThread::currentThreadId() << "\'.";
|
||||
|
||||
// Save all cached data first.
|
||||
getParentServiceRoot()->saveAllCachedData();
|
||||
|
||||
bool error_during_obtaining;
|
||||
QList<Message> msgs = obtainNewMessages(&error_during_obtaining);
|
||||
|
||||
|
@ -135,13 +135,14 @@ void OwnCloudServiceRoot::addMessageStatesToCache(const QStringList &ids_of_mess
|
||||
}
|
||||
|
||||
void OwnCloudServiceRoot::saveAllCachedData() {
|
||||
m_cacheSaveMutex->lock();
|
||||
|
||||
if (m_cachedStatesRead.isEmpty() && m_cachedStatesImportant.isEmpty()) {
|
||||
// No cached changes.
|
||||
m_cacheSaveMutex->unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
m_cacheSaveMutex->lock();
|
||||
|
||||
// Make copy of changes.
|
||||
QMap<RootItem::ReadStatus, QStringList> cached_data_read = m_cachedStatesRead;
|
||||
cached_data_read.detach();
|
||||
|
Loading…
x
Reference in New Issue
Block a user