Problem
- Genz Updates could still return 403/Cloudflare in extension requests even when the same site worked in WebView.
- The extension HTTP path primarily used cached cookies from settings instead of reliably using the current WebView cookie jar.
- Cloudflare challenge detection was too narrow (mostly English markers) and could misclassify localized challenge pages as resolved.
Solution
- Prefer live WebView cookies for outgoing extension HTTP requests, with settings cookies as fallback.
- Sync cookie + user-agent from embedded WebView on onLoadStop in addition to history updates.
- Expand challenge detection with additional multilingual and platform markers.
Implementation Details
- Updated `MCookieManager.interceptRequest` to read cookies from `CookieManager.getCookies()` and use them as the request `Cookie` header when available.
- Added `_syncCookieAndUaFromWebView()` in `MangaWebView` and invoked it from both `onLoadStop` and `onUpdateVisitedHistory` to persist fresh clearance cookies immediately.
- Introduced a centralized `_cloudflareChallengePattern` in `m_client.dart` and reused it in `_containsCloudflareChallengeHtml` and `_isCloudflareChallengePage` for consistent challenge detection.
- prevent stale settings overwrites by reloading settings inside Isar write txn before updating chapterPageUrlsList
- guard getPageLength() against missing chapter entries and empty urls to avoid No element crashes
- simplify read-threshold calculation in setPageIndex() via totalPages/pagesRemaining for continuous and paged modes
- map visible continuous double-page indices to actual page indices in _readProgressListener before persisting progress
- snapshot item positions and clamp indices during fast scrolling to avoid volatile first/last access races
- Added new localization strings for total, mean per title, completion rate, watching time, reading time, average chapters per title, read percentage, and entries in multiple languages.
- Enhanced the History model to include readingTimeSeconds.
- Updated AnimeStreamController and ReaderController to track reading time and save it to history.
- Implemented reading time tracking in Anime and Novel reader views.
- Introduced statistics calculations for total reading time across histories.
- Updated statistics screen to display total reading time and average reading time per title.
- Added UpcomingUIModel for managing upcoming manga list items with headers and items.
- Introduced CalendarDay widget to display individual days with event indicators.
- Created CalendarHeader widget for navigating between months.
- Developed CalendarIndicator for visualizing events on specific days.
- Implemented UpcomingCalendar to manage the calendar view and event loading.
- Added UpcomingItem widget for displaying individual upcoming manga with cover images.
- Introduced FetchInterval utility to calculate fetch intervals based on chapter upload dates.
- Refactored updateMangaDetail to utilize FetchInterval for smart update days.
- Enhanced MedianExtension to ensure correct median calculation.
- Removed unused imports and commented-out code for cleaner implementation.
- Implemented multiple navigation layouts for the reader, including L-shaped, Kindle, Edge, Right & Left, and Disabled modes.
- Added settings for keeping the screen on, showing page gaps, and adjusting webtoon side padding.
- Enhanced the reader settings modal to include new options and improved UI for navigation layout selection.
- Color filters: invert/gray/BCS
- Added AppLockScreen for biometric authentication to unlock the app.
- Introduced security settings screen to enable/disable app lock.
- Integrated local_auth package for biometric authentication support.
- Created security state providers to manage app lock state.
- Updated chapter list tile widget to support dismiss actions for bookmarking and marking chapters as read.
- Enhanced CBZ conversion process to include ComicInfo.xml metadata.
- Added conditional UI elements based on platform capabilities.
- Added Completed & Tracked filter in library
- Remove unnecessary email and password state variables
- Rely on TextEditingController values instead of onChanged
- Reset error state on submit
- Dispose controllers after dialog closes
- Wrap login fields in AutofillGroup and add proper autofillHints for email, username, and password
- Add keyboard types, textInputAction, and onFieldSubmitted to improve form navigation
- Disable suggestions/autocorrect for password field
- Add TextInput.finishAutofillContext() on successful login
- Improve focus handling and overall form behavior
- Minor UI/structure adjustments for clarity and consistency