Open
Conversation
- Added Callback interface to ReaderMenuProvider for handling menu actions - Implemented onOpenMangaInfo() in ReaderActivity to open manga details - The info action now properly navigates to the manga details screen
…Model - Replaced TODO comment with proper documentation explaining the early return logic - The early return safely discards stale page position updates when content changes
- Replaced deprecated okhttp3.internal.platform.PlatformRegistry.applicationContext - Now uses proper public API okhttp3.OkHttp.initialize() for OkHttp 5.x
- BasePageHolder: Implement onTrimMemory to properly handle memory pressure - TRIM_MEMORY_MODERATE or higher: recycle the image view - TRIM_MEMORY_BACKGROUND or higher: apply downsampling - TypedListSpacingDecoration: Add vertical spacing for TIP list items
…wer state - Replace hardcoded PREFETCH_LIMIT_DEFAULT with dynamic computation - Adjust prefetch limit based on available RAM (2-10 pages) - Reduce prefetch on metered networks (cellular) by 50% - Reduce prefetch in power save mode by 50% - Add PREFETCH_LIMIT_MINIMUM, PREFETCH_LIMIT_LOW, PREFETCH_LIMIT_HIGH constants - Add isNetworkUnmetered() helper using NetworkCapabilities API
- Create ProxyWebViewUnsupportedException for better error handling - Add localized string 'proxy_webview_not_supported' to strings.xml - Update ProxyProvider to throw the new exception instead of generic IllegalArgumentException - Add exception mapping in Throwable.kt for localized display message - Import new exception in ExceptionResolver for future resolution support
- DetailsInteractor: Replace stale 'TODO: remove' with KDoc (class is in active use) - AppRouter: Remove empty TODO from fragmentTag() extension - ExternalMangaRepository: Clarify that external plugins don't support related manga - Fragment.kt: Improve comment about container ancestor lookup behavior - Preferences.kt: Fix MultiSelectListPreference.setDefaultValueCompat() to actually work (now checks if values is null/empty before setting, matching ListPreference behavior)
CSS Element Hiding (## rules): - Add cssSelectors list to RulesList for storing element hiding rules - Parse '##selector' rules and store CSS selectors - Add elementHidingSelectors property for accessing selectors - Add getElementHidingScript() to AdBlock for generating injectable JS - Script creates <style> tag to hide matched elements with display:none Domain Modifiers (domain= option): - Parse 'domain=example.com|~exclude.com' modifier syntax - Support both include (domain=x.com) and exclude (~x.com) domains - Apply domain restrictions in Rule.WithModifiers.invoke() - Extract baseDomain once for efficiency Removes 4 TODO comments from adblock implementation.
- Refactor shareFile() to detect files vs directories - Add shareSingleFile() for individual file sharing with proper MIME types - Add shareDirectory() to share all files in a directory as multiple streams - Support CBZ, CBR, ZIP file types with appropriate MIME types - Filter hidden files when sharing directory contents - Add new MIME type constants: TYPE_CBR, TYPE_ZIP, TYPE_OCTET_STREAM This allows sharing local manga stored as directories (containing images) in addition to the existing CBZ file support.
ReadButtonDelegate - Missing chapter handling: - Add 'Select chapter' action to Snackbar when chapter is missing - Change Snackbar duration to LENGTH_LONG for better visibility - User can now quickly navigate to chapter list to pick another chapter - Add 'select_chapter' string resource CaptchaHandler - Clarify request retry: - Replace ambiguous 'TODO check if ok' with explanatory comment - Document that re-enqueuing request after captcha resolution is correct DownloadNotificationFactory - Document cache behavior: - Add comment explaining covers HashMap is bounded by active downloads - Cache is simple and appropriate for notification icon use case Removes 3 TODO comments with meaningful improvements.
- Updated from commit hash e205a8706e to tagged release 1.2 - Includes latest parser fixes and new source support from YakaTeam fork - Tagged releases provide better stability than commit hashes
- Added KEY_JS_TIMEOUT setting with default of 4000ms (range: 2000-30000ms) - Inject AppSettings into MangaLoaderContextImpl - Use dynamic jsTimeoutMs property instead of hardcoded 4 seconds - Helps with complex CloudFlare challenges that need more time to resolve - Removed unused TimeUnit import
- Added BitmapCompressFormat enum with PNG, JPEG, WEBP, WEBP_LOSSLESS options - Added overloaded compressTo() with format and quality parameters - Maintains backward compatibility with original compressTo() method - Handles API level differences for WebP formats gracefully - Quality parameter (0-100) for lossy formats, ignored for lossless - Better compression choices: JPEG for photos, WebP for modern efficiency
- Persist failed mirror sources to SharedPreferences across app restarts - Add 24-hour TTL for blacklist entries (auto-expire and retry) - Add clearBlacklist() method to manually reset all failed sources - Add removeFromBlacklist() for individual source removal - Add blacklistedSources property to query current blacklist state - Load blacklist on init, cleanup expired entries before each check - Handle unknown/removed sources gracefully during storage load - Added @singleton annotation for proper DI lifecycle
ExternalPluginContentSource:
- Added getRelatedManga() method to query related manga from plugins
- Uses content URI: content://{authority}/manga/related/{url}
- Gracefully returns empty list if plugin doesn't support this feature
- Added COLUMN_RELATED_MANGA constant for capability detection
MangaSourceCapabilities:
- Added isRelatedMangaSupported flag (default: false for compatibility)
- Read from capabilities cursor during plugin initialization
ExternalMangaRepository:
- Updated getRelatedMangaImpl() to use plugin's related manga feature
- Checks capability before making content provider query
- Maintains backward compatibility with plugins that don't support it
- Configurable max retries (default: 3 attempts) - Exponential backoff with jitter to prevent thundering herd - Respects Retry-After header when present, caps at maxDelayMs - Calculated delay formula: min(maxDelay, initialDelay * 2^retryCount) ± 25% jitter - Default delays: 1s initial, 30s max, 2x multiplier - Debug logging for retry attempts - Fixed parseRetryAfter to handle HTTP date format properly - Only throws TooManyRequestExceptions after all retries exhausted
ProxyBlacklistManager (new): - Singleton class managing persistent host blacklist - SharedPreferences storage with timestamps for TTL - 6-hour expiration for blacklist entries - Thread-safe with synchronized access - Methods: isBlacklisted(), addToBlacklist(), removeFromBlacklist(), clearBlacklist() BaseImageProxyInterceptor: - Now accepts optional ProxyBlacklistManager parameter - Removed in-memory ArraySet blacklist - Delegates to manager for blacklist operations - Backward compatible with null manager WsrvNlProxyInterceptor / ZeroMsProxyInterceptor: - Updated constructors to accept blacklist manager RealImageProxyInterceptor: - Injects ProxyBlacklistManager via Hilt - Passes manager to child interceptors on creation
AppSettings: - Added KEY_CACHE_DETAILS_TTL (default: 5 min, range: 1-60) - Added KEY_CACHE_PAGES_TTL (default: 10 min, range: 1-120) - Added KEY_CACHE_RELATED_TTL (default: 10 min, range: 1-120) - Added getter properties with coerceIn bounds validation MemoryContentCache: - Now injects AppSettings for TTL configuration - Uses configurable TTL values instead of hardcoded - Added KDoc explaining settings and restart requirement - Reformatted cache initialization for clarity Note: Changes to cache TTL settings require app restart to take effect.
AppSettings: - Added KEY_TRACKER_PARALLELISM setting (default: 6, range: 1-12) - Added DEFAULT_TRACKER_PARALLELISM constant CheckNewChaptersUseCase: - Added checkBatch() method returning Flow<MangaUpdates> - Parallel execution with configurable semaphore - Maintains per-manga mutex locking for thread safety - Added DEFAULT_PARALLELISM and MAX_PARALLELISM constants TrackWorker: - Now uses checkBatch() from CheckNewChaptersUseCase - Reads parallelism from settings.trackerParallelism - Removed redundant channelFlow/semaphore implementation - Removed MAX_PARALLELISM constant (now in use case) - Cleaned up unused imports
- Add NetworkQuality enum for quality levels (OFFLINE/POOR/MODERATE/GOOD/EXCELLENT) - Add NetworkQualityMonitor for real-time network assessment - Monitors WiFi/cellular/ethernet connections - Tracks bandwidth via download samples - Measures latency periodically - Detects cellular network types (2G/3G/4G/5G) - Add AdaptiveNetworkSettings for dynamic configuration - Adaptive timeouts based on network quality - Concurrent download limits - Preload page counts - Image quality reduction settings - Retry counts and delays - Add BandwidthTrackingInterceptor for OkHttp - Tracks download speeds automatically - Reports to NetworkQualityMonitor for assessment - Update NetworkState with transport type helpers - isWifi(), isCellular(), getTransportType() - Integrate BandwidthTrackingInterceptor into MangaHttpClient Features: - Real-time network quality assessment - Automatic bandwidth estimation from downloads - Adaptive timeouts (10s-30s connect, 30s-90s read) - Dynamic concurrent download limits (0-6) - Preload page count adaptation (0-5) - Observable network quality state
- Add DnsPrefetcher class implementing OkHttp Dns interface - Caches DNS results with 5-minute TTL - Proactive refresh before entries expire - Common CDN domains pre-configured - Observable cache statistics - Add DnsPrefetchManager for manga source integration - Auto-prefetch domains for enabled sources - Prefetch when sources become enabled - Source-specific CDN domain support - Integrate with existing DoH infrastructure - DnsPrefetcher wraps DoHManager as delegate - Seamless integration with existing DNS-over-HTTPS - Initialize on app startup via BaseApp Features: - DNS cache with configurable TTL (5 min default) - Background refresh 1 minute before expiry - Prefetch for enabled manga source domains - Common CDN domains (jsdelivr, cloudflare, googleapis) - Source-specific CDN domains (MangaDex, Webtoon) - Cache statistics for debugging - Network-aware (skip when offline)
- Add ResumableDownloader for HTTP Range request support - Detects server support via Accept-Ranges header - Resumes partial downloads from last byte position - Falls back to full download if resume not supported - Validates Content-Range responses - Add DownloadStateTracker for persistent download state - Tracks chapter download progress (completed pages) - Stores partial file information for resume - Automatically cleans up data older than 7 days - Thread-safe with mutex protection - Integrate with DownloadWorker - Use resumable downloader for HTTP page downloads - Track partial files on download failure - Resume from partial files on retry - Clean up tracking after successful download
- Update Java compatibility from 11 to 17 - Optimize DnsPrefetchManager to prefetch on-demand - Add more CDN domains for MangaKakalot and MangaSee sources
Add comprehensive database indexes and optimization utilities: Migration 27->28 adds indexes for: - manga: source, title, public_url - history: deleted_at, updated_at, created_at, percent, composite - tracks: chapters_new, last_chapter_date, last_check_time - favourites: composite deleted_at + created_at - bookmarks, scrobblings, local_index, suggestions: manga_id - tags: title - track_logs: manga_id, created_at - stats: manga_id, started_at Entity annotations updated: - MangaEntity: Added Index annotations for source, title, public_url - HistoryEntity: Added Index annotations for all query-critical columns - TrackEntity: Added Index annotations for sorting columns DatabaseOptimizer utility: - ANALYZE for query planner statistics - VACUUM for database compaction - Database size and fragmentation statistics - Index listing for debugging - Integrity checking - Query plan explanation (debug builds) These indexes significantly improve performance for: - History list with filtering/sorting - Favourites list with sorting - Search by title/author/tag - Track new chapters queries - Manga lookup by source
Implements automatic background checking for app updates with notifications: Core Components: - AppUpdateCheckWorker: Background worker for periodic update checks using WorkManager - Configurable check interval (6/12/24/48/72 hours, default: 24) - WiFi-only option for data-conscious users - Respects user preferences for stable/unstable releases - Exponential backoff retry policy (max 3 attempts) - Flex interval (25% of check interval) for WorkManager optimization - Requires battery not low + network connectivity - AppUpdateNotifier: Rich notification system for available updates - Notification channel 'app_updates' with low importance - Displays version name, APK size, and changelog preview (first 3 lines) - Two actions: Download (opens AppUpdateActivity) and Dismiss - Handles Android 13+ notification permission check - AppUpdateDismissReceiver: Broadcast receiver for notification dismissal Settings Integration: - isAutoUpdateCheckEnabled: Toggle background checks (default: true) - updateCheckIntervalHours: Check frequency selection - isUpdateCheckWifiOnly: Restrict checks to WiFi (default: false) - lastUpdateCheckTime: Timestamp tracking for check scheduling - skipVersion/isVersionSkipped: Allow users to skip specific versions WorkScheduleManager Integration: - Automatic scheduling on app startup - Reschedules when relevant settings change - Proper cancellation when feature disabled AppUpdateViewModel Enhancement: - Added skipCurrentVersion() method for UI integration - Injected AppSettings for version skip functionality
Implements tracking of source reliability and performance metrics: Database Layer: - SourceHealthEntity: Stores comprehensive health metrics per source - Success/failure counts for reliability calculation - Response time stats (avg, min, max) using exponential moving average - Consecutive failure tracking for detecting outages - Last error message storage (truncated to 200 chars) - Stats reset timestamp for data freshness - SourceHealthDao: CRUD operations with health-aware queries - recordSuccess(): Updates counts, recalculates response time average - recordFailure(): Increments failure counts, stores error - getHealthySources(): Filter by minimum success rate - getFailingSources(): Find sources with high consecutive failures - Migration28To29: Creates source_health table with index Repository Layer: - SourceHealthRepository: High-level API for health data - Query methods: by reliability score, by speed, by health status - HealthSummary: Aggregate stats across all tracked sources - Health status enum: UNKNOWN, HEALTHY, DEGRADED, POOR, CRITICAL Health Metrics: - Success rate: (success_count / total) * 100 - Reliability score (0-100): 70% from success rate + 30% from response time - Response time scoring: <1s=30pts, <2s=25pts, <3s=20pts, etc. - Health status thresholds: >=80=HEALTHY, >=60=DEGRADED, >=40=POOR, <40=CRITICAL Integration: - SourceHealthTracker: Wraps operations to automatically record metrics - trackOperation(): Measures time, records success/failure - isSourceUnreliable(): Check if source has too many consecutive failures - Empty result detection for potential source issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements tracking of source reliability and performance metrics:
Database Layer:
Repository Layer:
Health Metrics:
Integration: