- Replace synchronous Isar writes with async transactions in `AboutScreen`
- Make `AppLogger.init()` and `dispose()` fully async and guarded with `_busy`
- Remove `StreamController` queue and write directly to the IOSink
- Prevent double‑initialization and race conditions using `_initialized` + `_busy`
- Update log toggle handler to await logger init/dispose for consistency
Fix following Exception when disabling and re-enabling logger:
```
Exception has occurred.
StateError (Bad state: Stream has already been listened to.)
```
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.
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.
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.
`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()`
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
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?
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.
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.
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.