The list of entries in a group is not sortable by time. It's possible to sort an individual news feed (e.g. newest on top), but as soon as I click on the group to display all feeds in that group, the order gets mixed up.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Also works as expected. Articles are sorted by date added and not by their given published date because there are issues with pagination.
The issue is only present the first time you use the app
I can not confirm that it's working as expected. The sorting is also mixed
up with new articles (after the initial import), not only imported ones.
On Thu, Nov 10, 2016 at 9:35 AM Bernhard Posselt [email protected]
wrote:
Also works as expected. Articles are sorted by date added and not by their
given published date because there are issues with pagination.The issue is only present the first time you use the app
owncloud/news#836 https://github.com/owncloud/news/issues/836
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nextcloud/news/issues/51#issuecomment-259631215, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABUtN0szpJ_JT8CGqDKmYLNQS7rgjQYjks5q8tdSgaJpZM4KuVGG
.
They should be in order when they were added. Ordering is done by id which is an auto increment when things are added. So there might be slight differences depending on if the feed reports a wrong date or when articles are added faster than in a different feed.
Again, works as expected ;)
Please read up on the linked issues if you still disagree
TL;DR: Changes required for fixing this issue are basically the following:
I will continue to test the behavior in the next couple of days, but the
sorting keeps getting mixed up by several hours or even days in some cases:

On Thu, Nov 10, 2016 at 1:34 PM Bernhard Posselt [email protected]
wrote:
TL;DR: Changes required for fixing this issue are basically the following:
- Use 128bit Integers (we lack the hardware) to do this on a database
level- Get rid of autopaging which will significantly slow down the web
interface—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nextcloud/news/issues/51#issuecomment-259679123, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABUtNzN0uiPgxpPl0MJps3YYwSZNPPTEks5q8w9wgaJpZM4KuVGG
.
Would be interesting if you could provide example feeds. The image was not appended btw
Here are two examples:
http://news.google.com/news?hl=en&gl=us&q=android&um=1&ie=UTF-8&output=rss
http://news.google.com/news?hl=en&gl=us&q=oneplus&um=1&ie=UTF-8&output=rss
EDIT: fixed links
Reason is that google does not publish the articles in order when they were released. A sort by pubdate should work before the loop is being run here https://github.com/nextcloud/news/blob/master/lib/Service/FeedService.php#L238
FYI this wont fix the "group" ordering but ordering them by pubdate is probably a good idea when adding new feeds
The reverse loop can be dropped in favor of a foreach loop.
http://php.net/manual/en/function.usort.php can be used to compare items by their pubdate, probably similar to this:
usort($items, function ($a, $b) {
return ($a->getPubDate() < $b->getPubDate()) ? -1 : 1;
});
@BernhardPosselt Any updates on this matter? :blush:
@Peque yeah, I stopped maintaing the app.