Order updates by fetch date in the queries themselves

The updates queries relied on the view's ORDER BY surviving into the query that reads from it, which SQLite doesn't promise. Each now orders by fetch date itself.
This commit is contained in:
AntsyLich
2026-09-27 23:10:14 +06:00
parent 4b48a84ec9
commit b74e010bfe
@@ -29,6 +29,7 @@ getRecentUpdates:
SELECT *
FROM updatesView
WHERE dateUpload > :after
ORDER BY datefetch DESC
LIMIT :limit;
getRecentUpdatesWithFilters:
@@ -73,6 +74,7 @@ AND (
)
)
)
ORDER BY datefetch DESC
LIMIT :limit;
getUpdatesByReadStatus:
@@ -80,4 +82,5 @@ SELECT *
FROM updatesView
WHERE read = :read
AND dateUpload > :after
ORDER BY datefetch DESC
LIMIT :limit;