Commit graph

1023 commits

Author SHA1 Message Date
Moustapha Kodjo Amadou
853a9d599b v0.7.60 2026-04-21 17:05:15 +01:00
Moustapha Kodjo Amadou
8595d62c71
Merge pull request #703 from NBA2K1/fix-reader
Fix reader and Code Cleanup
2026-04-21 16:54:08 +01:00
Moustapha Kodjo Amadou
6fe1b8e844 Refactor chapter navigation and improve page indicator responsiveness 2026-04-21 16:52:43 +01:00
Moustapha Kodjo Amadou
7f0c69020d
Merge pull request #705 from NBA2K1/improve-manga-home-screen-performance
Improve performance of library, manga home, and tracker screens
2026-04-21 11:12:20 +01:00
Moustapha Kodjo Amadou
7bec3c551a Disable previous chapter preloading for optimization 2026-04-21 10:23:47 +01:00
Moustapha Kodjo Amadou
b5de2693ba Revert "Disable previous chapter preloading for optimization"
This reverts commit a0512564b4.
2026-04-21 10:08:33 +01:00
Moustapha Kodjo Amadou
a0512564b4 Disable previous chapter preloading for optimization 2026-04-21 09:58:45 +01:00
NBA2K1
07470c08c7 Add Copilot suggested change (3/3)
https://github.com/kodjodevf/mangayomi/pull/705#discussion_r3112086148
2026-04-20 18:47:05 +02:00
NBA2K1
0d64ca8875 Add Copilot suggested change (2/3)
https://github.com/kodjodevf/mangayomi/pull/705#discussion_r3112086120
2026-04-20 18:46:47 +02:00
NBA2K1
81a4893ad4 Add Copilot suggested change (1/3)
https://github.com/kodjodevf/mangayomi/pull/705#discussion_r3112086061
2026-04-20 18:46:20 +02:00
NBA2K1
af49eaee68 Make cards equal in size 2026-04-20 02:33:50 +02:00
NBA2K1
e68815bde2 Fix Overflow Exception 2026-04-20 01:09:48 +02:00
Schnitzel5
f1bc5f16a2 updated grpc fields for Aniyomi backup 2026-04-19 23:42:12 +02:00
NBA2K1
ef31d94e01 Use animatePageTransitions value 2026-04-19 21:10:12 +02:00
NBA2K1
519dd048ee Use width for minCacheExtent when in horizontal 2026-04-19 21:09:49 +02:00
NBA2K1
ee0f283cc3 Update manga_home_screen.dart
add a defensive guard as a safety net for any pre-existing duplicate records in users' databases.
2026-04-19 05:03:56 +02:00
NBA2K1
233ffa1b2c Update manga_image_card_widget.dart 2026-04-19 04:57:36 +02:00
Whiskas101
232ae8ea86 change: switch to async fetch for isar due to lag in large libraries 2026-04-19 02:19:41 +02:00
NBA2K1
98b3121c04 Move tracker lookup to parent
Replace per-card Isar tracking streams with a single subscription in
TrackerSectionScreen.

- Build a mediaId -> Track index at the screen level
- Pass resolved Track? into TrackerLibraryImageCard
- Convert TrackerLibraryImageCard to a plain StatelessWidget
- Remove StreamBuilder, ConsumerStatefulWidget, and keep-alive boilerplate
- Keep the same UI while reducing widget-level DB work

This follows the same parent-index pattern used elsewhere and makes
the tracker library view lighter and easier to maintain.
2026-04-19 01:48:59 +02:00
NBA2K1
bcc44e94cb Replace download queries with cached provider
Remove synchronous Isar queries from each library grid item when
downloadedChapter is enabled.

- Replace per-card download queries with downloadedChapterIdsProvider
- Compute downloadCount via in-memory lookup instead of DB calls
- Eliminate repeated sync queries on rebuilds and tab switches
- Minor cleanup of unread chapter filter

This avoids dozens of synchronous queries per frame and significantly
improves grid performance and responsiveness.
2026-04-19 01:48:59 +02:00
NBA2K1
525eeea3ac Use shared library index for manga cards
Replace per-widget Isar StreamBuilder usage with a single shared
library index managed in MangaHomeScreen.

- Subscribe once to manga updates and build a name -> Manga map
- Pass libraryManga down to card widgets instead of querying per item
- Remove StreamBuilder logic from MangaImageCardWidget and list tile
- Use library data for cover, tracker image, and favorite state
- Add favorite overlay indicator based on libraryManga
- Clean up redundant filtering and improve performance

This reduces rebuild overhead and avoids multiple database listeners
per list/grid item.
2026-04-19 01:48:39 +02:00
NBA2K1
e6b10f7a97 Fix memory leak
`addListener` is called inside the `data:` callback of `build()`.
Every single time the widget rebuilds, which happens on scroll, on tab switch,
on any `setState`, it adds *another* listener to `_scrollController`,
stacking up indefinitely. With 100 items and active scrolling,
you can easily accumulate hundreds of listeners,
each one firing `setState` + `_loadMore()` on every scroll-to-bottom.

Fix: Move the listener setup to `initState()` and remove it in `dispose()`
2026-04-18 21:33:44 +02:00
Whiskas101
b670ac9e85 fix: removed unnecessary listeners created (.read instead of .watch) 2026-04-18 20:45:28 +02:00
Whiskas101
37e831fd4e fix: forcing keep alive causing memory leak 2026-04-18 20:43:54 +02:00
NBA2K1
1eed6fe01e add ordered prefetch to prioritize early pages 2026-04-18 20:15:03 +02:00
NBA2K1
0cfc8456b7 set _isNextChapterPreloading = false if it isn't 2026-04-17 17:21:49 +02:00
NBA2K1
489a19170f Fix and improve ChapterTransitionPage
Fix an Exception:

```
════════ Exception caught by rendering library ═════════════════════════════════
A RenderFlex overflowed by 274 pixels on the bottom.
The relevant error-causing widget was:
    Column Column:file:///lib/modules/manga/reader/widgets/chapter_transition_page.dart:28:18
════════════════════════════════════════════════════════════════════════════════
```

Improved: The UI adapts to the reading mode now
2026-04-16 03:31:18 +02:00
NBA2K1
6ae2ac1a95 Why are there two searchproviders? 2026-04-15 23:41:47 +02:00
NBA2K1
6aef999fd1 move extensions to correct files 2026-04-15 23:41:19 +02:00
NBA2K1
09a4517d33 Fix reader 2026-04-15 22:08:54 +02:00
NBA2K1
04e04010f4 Reduce Code Duplication 2026-04-15 22:04:15 +02:00
NBA2K1
63e747fa3e watch -> read 2026-04-15 22:04:09 +02:00
NBA2K1
c2d19fd17d make the list const 2026-04-15 22:04:03 +02:00
NBA2K1
35479187ca Remove unused import 2026-04-15 22:03:54 +02:00
Moustapha Kodjo Amadou
ca51a38fbd fix #702 2026-04-15 12:53:50 +01:00
Moustapha Kodjo Amadou
0576583528 fix: add spacing to TTS settings tab for better layout 2026-04-13 15:15:05 +01:00
Moustapha Kodjo Amadou
dacebb660a
Merge pull request #697 from NBA2K1/performance-improvements
fix page jumps in vertical/webtoon mode + performance improvements in library/reader
2026-04-13 10:55:25 +01:00
Moustapha Kodjo Amadou
feb0a3635f Fix sorting logic for chapters 2026-04-13 10:40:05 +01:00
Moustapha Kodjo Amadou
ee91e3cec7
Merge pull request #696 from NBA2K1/Fix-FileSystemException
Pass sanitized chapterName instead chapter.name
2026-04-13 09:48:45 +01:00
NBA2K1
e33af9cbe6 Update library_screen.dart 2026-04-12 23:03:56 +02:00
NBA2K1
cc05ee13e8 Reduce code duplication
Also, change
`entry.chapters.toList().reversed.toList().last`
to
`entry.chapters.first`
Why reverse the list and then get the last item, when you can just get the first?
2026-04-12 23:03:50 +02:00
NBA2K1
05111da02b Extract ContinueReaderButton 2026-04-12 23:03:44 +02:00
NBA2K1
d706e82fd8 simplify query for continueReaderBtn
Refactor history lookup to use a direct mangaIdEqualTo query instead of the previous multi‑level chapter/manga filter.
The new approach improves performance, readability, and maintainability without changing how the play button behaves or how history entries are resolved.
2026-04-12 23:03:37 +02:00
NBA2K1
3f19636fcf Optimize download check
Change per‑chapter synchronous lookups inside isar.txnSync to a single batched anyOf query using collected chapter IDs.

Reduces repeated filtering, removes unnecessary loop, and improves performance.
2026-04-12 23:03:32 +02:00
NBA2K1
31409bfb3c Use mangaIds
No need to create new `mangaIdsList` variable, because mangaIds is the same
2026-04-12 23:03:23 +02:00
NBA2K1
81123dc3cb Change the MangasListStateProvider to Set<int>
MangasListState previously stored selected manga IDs as List<int>.
Every visible library card called .contains() on that list once per
rebuild to determine its highlight state, making each check O(n) in
the number of selected items. The provider's own update/selectAll/
selectSome methods also used .contains() and .remove() on a List.

Change the state type to Set<int> throughout, making all membership
checks O(1). Updated all consumers: library_gridview_widget,
library_listview_widget, library_app_bar, library_dialogs, and
MangasSetIsReadState.
2026-04-12 23:03:18 +02:00
NBA2K1
c5c97d712b debounce the search query 2026-04-12 23:03:12 +02:00
NBA2K1
d8ff9fb01d performance+
Change Clip.antiAliasWithSaveLayer to Clip.antiAlias
2026-04-12 23:03:07 +02:00
NBA2K1
9f113f2956 Optimize downloaded‑chapter filtering
- Precompute downloaded chapter IDs in a single query
- Replace per‑chapter lookups with in‑memory `Set` checks
2026-04-12 23:02:43 +02:00
NBA2K1
547413cad3 return correct List<Chapter> 2026-04-12 23:02:26 +02:00