diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp index 8ff0b8c97..1456af77a 100755 --- a/src/gui/formmain.cpp +++ b/src/gui/formmain.cpp @@ -188,11 +188,12 @@ void FormMain::onAboutToQuit() { } qDebug("Cleaning up resources and saving application state."); - m_ui->m_tabWidget->feedMessageViewer()->quitDownloader(); - // TODO: podle nastaveni - m_ui->m_tabWidget->feedMessageViewer()->feedsView()->clearAllReadMessages(); + if (Settings::instance()->value(APP_CFG_MESSAGES, "clear_read_on_exit", false).toBool()) { + m_ui->m_tabWidget->feedMessageViewer()->feedsView()->clearAllReadMessages(); + } + DatabaseFactory::instance()->saveMemoryDatabase(); saveSize(); } diff --git a/src/gui/formsettings.cpp b/src/gui/formsettings.cpp index a93d87d06..349439ff3 100755 --- a/src/gui/formsettings.cpp +++ b/src/gui/formsettings.cpp @@ -153,9 +153,11 @@ void FormSettings::selectBrowserExecutable() { } void FormSettings::loadFeedsMessages() { + m_ui->m_checkRemoveReadMessagesOnExit->setChecked(Settings::instance()->value(APP_CFG_MESSAGES, "clear_read_on_exit", false).toBool()); } void FormSettings::saveFeedsMessages() { + Settings::instance()->setValue(APP_CFG_MESSAGES, "clear_read_on_exit", m_ui->m_checkRemoveReadMessagesOnExit->isChecked()); } void FormSettings::displayProxyPassword(int state) {