Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
delete-read-articles-on-quit *marks* as deleted
Browse files Browse the repository at this point in the history
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 #581 (comment)
  • Loading branch information
Minoru committed Aug 9, 2017
1 parent 69a53a6 commit cc5d03e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc5d03e

Please sign in to comment.