diff options
author | 2017-08-09 20:51:14 +0300 | |
---|---|---|
committer | 2017-08-09 20:55:26 +0300 | |
commit | cc5d03efe84da2d806087a2138fb9c583cefb113 (patch) | |
tree | fb8a6046c3f0abec67e0680e73a21315ee59857d /src | |
parent | 69a53a602de48a610e39d70aa605c153c182ad19 (diff) | |
download | newsboat-cc5d03efe84da2d806087a2138fb9c583cefb113.tar.gz newsboat-cc5d03efe84da2d806087a2138fb9c583cefb113.tar.zst newsboat-cc5d03efe84da2d806087a2138fb9c583cefb113.zip |
delete-read-articles-on-quit *marks* as deleted
This hides the articles from the user (effectively deleting them), but
still keeps the article in the cache so that future updates don't bring
them back. The articles will be deleted for real only when they fall out
of the feed.
Kudos to @polyzen for bringing this up in https://github.com/akrennmair/newsbeuter/issues/581#issuecomment-320380691
Diffstat (limited to '')
-rw-r--r-- | src/cache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cache.cpp b/src/cache.cpp index 458241b8..3c48ee2d 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -583,7 +583,7 @@ void cache::cleanup_cache(std::vector<std::shared_ptr<rss_feed>>& feeds) { cleanup_rss_items_statement.append(1,';'); std::string cleanup_read_items_statement( - "DELETE FROM rss_item WHERE unread = 0"); + "UPDATE rss_item SET deleted = 1 WHERE unread = 0"); run_sql(cleanup_rss_feeds_statement); run_sql(cleanup_rss_items_statement); |