Persistent msg cache, do not save on exit.
This commit is contained in:
parent
3e4b23886c
commit
49fda7a6b6
|
@ -271,8 +271,6 @@ void FeedReader::quit() {
|
|||
m_autoUpdateTimer->stop();
|
||||
}
|
||||
|
||||
checkServicesForAsyncOperations(false, true);
|
||||
|
||||
// Close worker threads.
|
||||
if (m_feedDownloaderThread != nullptr && m_feedDownloaderThread->isRunning()) {
|
||||
m_feedDownloader->stopRunningUpdate();
|
||||
|
|
|
@ -125,8 +125,6 @@ void CacheForServiceRoot::loadCacheFromFile(int accId) {
|
|||
file.remove();
|
||||
}
|
||||
|
||||
// TODO: TODO
|
||||
|
||||
m_cacheSaveMutex->unlock();
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ bool ServiceRoot::deleteViaGui() {
|
|||
QSqlDatabase database = qApp->database()->connection(metaObject()->className(), DatabaseFactory::FromSettings);
|
||||
|
||||
if (DatabaseQueries::deleteAccount(database, accountId())) {
|
||||
stop();
|
||||
requestItemRemoval(this);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ RecycleBin* OwnCloudServiceRoot::recycleBin() const {
|
|||
void OwnCloudServiceRoot::start(bool freshly_activated) {
|
||||
Q_UNUSED(freshly_activated)
|
||||
loadFromDatabase();
|
||||
//loadCacheFromFile(accountId());
|
||||
loadCacheFromFile(accountId());
|
||||
|
||||
if (qApp->isFirstRun(QSL("3.1.1")) || (childCount() == 1 && child(0)->kind() == RootItemKind::Bin)) {
|
||||
syncIn();
|
||||
|
@ -100,7 +100,7 @@ void OwnCloudServiceRoot::start(bool freshly_activated) {
|
|||
}
|
||||
|
||||
void OwnCloudServiceRoot::stop() {
|
||||
//saveCacheToFile(accountId());
|
||||
saveCacheToFile(accountId());
|
||||
}
|
||||
|
||||
QString OwnCloudServiceRoot::code() const {
|
||||
|
|
|
@ -51,6 +51,7 @@ TtRssServiceRoot::~TtRssServiceRoot() {
|
|||
void TtRssServiceRoot::start(bool freshly_activated) {
|
||||
Q_UNUSED(freshly_activated)
|
||||
loadFromDatabase();
|
||||
loadCacheFromFile(accountId());
|
||||
|
||||
if (qApp->isFirstRun(QSL("3.1.1")) || (childCount() == 1 && child(0)->kind() == RootItemKind::Bin)) {
|
||||
syncIn();
|
||||
|
@ -58,6 +59,8 @@ void TtRssServiceRoot::start(bool freshly_activated) {
|
|||
}
|
||||
|
||||
void TtRssServiceRoot::stop() {
|
||||
saveCacheToFile(accountId());
|
||||
|
||||
m_network->logout();
|
||||
qDebug("Stopping Tiny Tiny RSS account, logging out with result '%d'.", (int) m_network->lastError());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue