flathub / com.gitlab.newsflash

This repo is archived by Flathub as the app is EOL. If this was done in error, please open an issue at https://github.com/flathub/flathub/issues
https://flathub.org/apps/details/com.gitlab.newsflash
1 stars 1 forks source link

Older articles are not removed #8

Closed mochiballs closed 3 years ago

mochiballs commented 3 years ago

System: Linux Mint 19.3 Cinnaon When you go to Settings > App > User Data > Keep Articles and set "Keep Articles" to "One Month". Articles older than one month are not removed after closing the settings, I have tried refreshing the content, clearing web view cache, and restarting the application. None of those seemed to make a difference.

I am not sure if this is a bug, or if it's user error on my end.

jangernert commented 3 years ago

I'm not sure why you would file this issue when apparently applying the setting doesn't even work for you #7

jangernert commented 3 years ago

Okay, seems like only the "1 week" option was not working. So "1 month" should in theory work for you. After a sync articles that are older than specified should be deleted as long as they're not unread or starred: https://gitlab.com/news-flash/news_flash/-/blob/master/src/database/mod.rs#L849

mochiballs commented 3 years ago

I'm not sure why you would file this issue when apparently applying the setting doesn't even work for you #7

I apologize, I should have been clear about only the "1 week" option not working in #7. Thanks for fixing the issue.

mochiballs commented 3 years ago

After a sync articles that are older than specified should be deleted as long as they're not unread or starred: https://gitlab.com/news-flash/news_flash/-/blob/master/src/database/mod.rs#L849

Thanks @jangernert ,

I tried as you described (I've attached a screen recording from today, Feb 5, 2021), but syncing after marking all articles in the channel as read, did not limit the articles to one month. As you will see in the attached screen recording, the articles from December of 2020 are still visible..

I acknowledge this could be user error on my part, but I'll await your suggestion in case this is in fact a bug. Thanks :)

https://user-images.githubusercontent.com/71861263/107089613-ea7d4680-67cc-11eb-8b72-30c6c907d133.mp4

jangernert commented 3 years ago

Thanks for the detailed report. I'll look into it.

jangernert commented 3 years ago

I took a look at the problem. I don't think there is a bug, but rather a misunderstanding. I forgot to mention that the duration is not related to the reported date of the article but rather the time of sync. Most of the time these two values will be about the same. They will however differ greatly when adding a new feed or the feed publishes a "new" article with invalid date information. To use the time of sync helps situations where articles are deleted immediately after sync because either NewsFlash hasn't synced for a while or the feed specified the wrong date (not uncommon).

I think I'll add a little explanation to the setting. By now about a week has passed. So you should be able to confirm that articles synced over a week ago are deleted.

mochiballs commented 3 years ago

That's awesome! Thanks for looking into it!

To use the time of sync helps situations where articles are deleted immediately after sync because either NewsFlash hasn't synced for a while or the feed specified the wrong date (not uncommon).

That makes total sense. Thanks for taking that into consideration.

I think I'll add a little explanation to the setting.

That's a great idea .. it will definitely clarify a lot :)

By now about a week has passed. So you should be able to confirm that articles synced over a week ago are deleted.

Yep it definitely works. The articles which were synced prior to the last week, and were marked as 'read' are now gone.

Should I close this issue? Or is it something that you need to do to keep things organized? (I'm kinda new to github and I don't know what the proper etiquette is )

jangernert commented 3 years ago

If everything is clear and it works we can close this.