[Bug] Wrong article dates and times
Closed this issue · 4 comments
Describe the bug
It seems that news dates are set to the time when they were fetched instead of the time they were created. This is very inconvenient because after fetching a bunch of news they are displayed in timeline in random order in the timeline.
To Reproduce
Steps to reproduce the behavior:
- Import an OPML file with many feeds.
- Refresh the timeline.
- See that all articles are dated <1 min ago and displayed in random order.
Expected behavior
Articles are dated according to the fetched feed and displayed in the chronological order.
Environment information (please complete the following information):
- Account type: local
- App version: 2.0-beta02
- Android version: GrapheneOS 13
- Device type: Pixel 4a
That's weird because DateTime.now()
is used only when an item doesn't have a date or if the date parsing failed.
Could you give me a reproducible feed?
Well, maybe my initial description is incorrect. Real article dates are displayed, but after them the fetch time follows (<1 min) and it is used for sorting instead of article creation time. So I see several articles from one feed, then several ones from another etc., likely in the order they were fetched.
Okay I understand better. In Timeline tab, you have at the top a filter/sort button. By default, all articles are ordered by article id. This lets old articles of a new feed to be at the top instead of being lost in the timeline. You can change that by ordering by date. Currently there is no remembering of this filter, so you will have to set it each time you open the app. It will come in the next major version.
To mitigate this issue, I changed the default order field to date
, to be closer to a general expecting behavior. Available in 2.0.1.