mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Fix: SeriesDetail passing Incorrect Args to Reader
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import { gql, thumbUrl } from "../../lib/client";
|
||||
import { GET_CATEGORIES, GET_LIBRARY, UPDATE_MANGA, GET_CHAPTERS, DELETE_DOWNLOADED_CHAPTERS, DEQUEUE_DOWNLOAD, CREATE_CATEGORY, UPDATE_MANGA_CATEGORIES, UPDATE_CATEGORY_ORDER } from "../../lib/queries";
|
||||
import { cache, CACHE_KEYS, CACHE_GROUPS, DEFAULT_TTL_MS } from "../../lib/cache";
|
||||
import { dedupeMangaById, dedupeMangaByTitle } from "../../lib/util";
|
||||
import { dedupeMangaById, dedupeMangaByTitle, isNsfwManga } from "../../lib/util";
|
||||
import { store, setLibraryFilter, checkAndMarkCompleted as storeCheckAndMarkCompleted, updateSettings, setCategories } from "../../store/state.svelte";
|
||||
import type { LibrarySortMode, LibrarySortDir, LibraryStatusFilter } from "../../store/state.svelte";
|
||||
import type { Manga, Category, Chapter } from "../../lib/types";
|
||||
@@ -319,10 +319,15 @@
|
||||
items = categoryMangaMap.get(Number(store.libraryFilter)) ?? [];
|
||||
}
|
||||
|
||||
// 2. Text search
|
||||
// 2. NSFW filter — always applied before text search or sort
|
||||
if (!store.settings.showNsfw) {
|
||||
items = items.filter(m => !isNsfwManga(m));
|
||||
}
|
||||
|
||||
// 3. Text search
|
||||
if (q) items = items.filter(m => m.title.toLowerCase().includes(q));
|
||||
|
||||
// 3. Status filter
|
||||
// 4. Status filter
|
||||
if (status !== "ALL") {
|
||||
items = items.filter(m => {
|
||||
const s = m.status?.toUpperCase().replace(/\s+/g, "_") ?? "UNKNOWN";
|
||||
@@ -330,7 +335,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 4. Sort
|
||||
// 5. Sort
|
||||
const recentlyReadMap = new Map<number, number>();
|
||||
if (mode === "recentlyRead") {
|
||||
for (const h of store.history) {
|
||||
|
||||
Reference in New Issue
Block a user