From 3065e80b36956967c4d2b24282fb629a60bd7798 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 28 Jul 2024 22:24:50 +0200 Subject: [PATCH] Properly sort chapters of same manga in updates In case chapters of the same manga had been fetched at the same time, they were sorted by their source order ascending instead of descending, which caused the newest chapter of that manga to be farther down instead of being the first --- src/lib/requests/RequestManager.ts | 5 ++++- versionToServerVersionMapping.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/requests/RequestManager.ts b/src/lib/requests/RequestManager.ts index 9b6c1933..47a29253 100644 --- a/src/lib/requests/RequestManager.ts +++ b/src/lib/requests/RequestManager.ts @@ -2409,7 +2409,10 @@ export class RequestManager { GET_CHAPTERS_UPDATES, { filter: { inLibrary: { equalTo: true } }, - order: [{ by: ChapterOrderBy.FetchedAt, byType: SortOrder.Desc }], + order: [ + { by: ChapterOrderBy.FetchedAt, byType: SortOrder.Desc }, + { by: ChapterOrderBy.SourceOrder, byType: SortOrder.Desc }, + ], first: initialPages * PAGE_SIZE + lastOffset, }, options, diff --git a/versionToServerVersionMapping.json b/versionToServerVersionMapping.json index 631bb73d..c208771f 100644 --- a/versionToServerVersionMapping.json +++ b/versionToServerVersionMapping.json @@ -1,7 +1,7 @@ [ { "uiVersion": "PREVIEW", - "serverVersion": "r1527" + "serverVersion": "r1540" }, { "tag": "v1.1.0",