diff --git a/CHANGELOG.md b/CHANGELOG.md index c2de2b09..d6b20ecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - (**Reader**) Fix infinite scrolling sometimes not opening previous/next chapter - (**Reader**) Fix preserving scroll position with RTL reading direction and a language that is read RTL - (**Browse**) Fix showing only nsfw sources in the browse source page when the "show nsfw" setting is disabled +- (**Manga**) Fix mark as read/unread option not being disabled for manga without any chapters ## [20260509.01] (r3147) - 2026-05-09 diff --git a/src/features/manga/services/Mangas.ts b/src/features/manga/services/Mangas.ts index 566bb1e5..a0d37b75 100644 --- a/src/features/manga/services/Mangas.ts +++ b/src/features/manga/services/Mangas.ts @@ -144,15 +144,15 @@ export class Mangas { } static isUnread({ unreadCount, chapters: { totalCount } }: MangaUnreadInfo): boolean { - return unreadCount === totalCount; + return totalCount > 0 && unreadCount === totalCount; } static getUnread(mangas: Mangas[]): Mangas[] { return mangas.filter(Mangas.isUnread); } - static isFullyRead({ unreadCount }: MangaUnreadInfo): boolean { - return unreadCount === 0; + static isFullyRead({ unreadCount, chapters: { totalCount } }: MangaUnreadInfo): boolean { + return totalCount > 0 && unreadCount === 0; } static getFullyRead(mangas: Mangas[]): Mangas[] { @@ -160,7 +160,11 @@ export class Mangas { } static isPartiallyRead(manga: MangaUnreadInfo): boolean { - return !Mangas.isUnread(manga) && !Mangas.isFullyRead(manga); + const { + chapters: { totalCount }, + } = manga; + + return totalCount > 0 && !Mangas.isUnread(manga) && !Mangas.isFullyRead(manga); } static getPartiallyRead(mangas: Mangas[]): Mangas[] {