feature: Group chapters by volume in Manga Screen#2906
feature: Group chapters by volume in Manga Screen#2906
Conversation
Updated MangaViewModel to expose an aggregate volume flow and precalculate chapter to volume mappings. MangaScreen now receives chapters grouped by their volume, and maps over this structure to insert volume-specific header cards via ExpressiveListCard, cleanly satisfying the requirement. Co-authored-by: nonproto <2092019+nonproto@users.noreply.github.com>
The previous update mapped volumes by collecting the aggregate database response directly into a Flow extension designed for non-null objects, triggering an NPE when no aggregate volume data existed. Introduced an \`AggregateResult\` wrapper in RxJava observables before mapping to a Flow to properly handle non-existent responses. Co-authored-by: nonproto <2092019+nonproto@users.noreply.github.com>
Configured MangaScreen to assign ListCardType.Top to volume headers and appropriately offset indices passed to MangaChapterListItem so chapters seamlessly attach to the volume's parent card boundary. Also handled the specific MangaDex 'none' volume value gracefully. Co-authored-by: nonproto <2092019+nonproto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request implements volume-based grouping for chapters on the manga screen. It introduces an aggregateFlow in MangaViewModel to retrieve volume data from the database and updates the MangaScreen to display chapters organized by volume headers. Key feedback involves adding error handling for JSON parsing of volume data to prevent crashes and adjusting the index/count parameters in the chapter list to maintain correct UI styling for list items.
app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt
Outdated
Show resolved
Hide resolved
|
shelving this for now as the aggregate endpoint only takes into account chapters uploaded on MangaDex and not all chapters to volumes. This causes issues with missing chapters on Dex and latest chapters being grouped into the same group. |
feature: Group chapters by volume in Manga Screen
Configured MangaScreen to assign ListCardType.Top to volume headers and appropriately offset indices passed to MangaChapterListItem so chapters seamlessly attach to the volume's parent card boundary. Also handled the specific MangaDex 'none' volume value gracefully.
PR created automatically by Jules for task 2608270239514151229 started by @nonproto