Commit graph

302 commits

Author SHA1 Message Date
Aryan
8990694d6c
ci: Add CLA Assistant workflow (#61) 2026-03-12 22:05:44 +05:30
Aryan
8582ed9679
Render embedded annotations in PDF (#59)
* Added support for reading and displaying embedded PDF annotations.

Changes include:
- Added JNI bindings in `NativePdfiumBridge` and `pdfium_bridge.cpp` to extract annotation count, subtypes, rectangles, and string values (Contents, NM, IRT, T) using PDFium.
- Introduced `EmbeddedAnnotation` data class to represent PDF annotations and their reply threads.
- Implemented annotation extraction logic in `PdfPageComposable` to fetch, group, and map embedded annotations (Sticky Notes, Highlights, etc.) to screen coordinates.
- Updated `PdfSelectionMenuPopup` to support displaying and copying comment threads.
- Improved selection menu positioning and hit detection for annotations.
- Added a safety check to recycle bitmaps in `PdfTile` rendering if handover to the main thread fails.

* Improved comment thread UI
2026-03-12 10:11:42 +05:30
Aryan
06ec45504f
Fdroid fix (#57)
* fix: reproducible build paths for native libs and strip unused brotli sos

* build: improve build reproducibility in CMake

* build: disable dependencies information in APK and Bundle
2026-03-10 22:16:43 +05:30
Aryan
7eb38bcafb
fix: reproducible build paths for native libs and strip unused brotli sos (#56) 2026-03-10 20:17:23 +05:30
Aryan
4a19bb2249
Add gitattributes (#55)
* Save work before normalizing line endings

* fix: .gitattributes encoding and normalize line endings
2026-03-10 19:59:53 +05:30
Aryan
6eb99b2c23
Save work before normalizing line endings (#54) 2026-03-10 17:48:25 +05:30
Aryan
6c94fb4c1e
fix: normalize line endings for reproducible builds (#53) 2026-03-10 16:40:43 +05:30
Aryan
fe48f444e2
build: bump version to 1.0.36 (#52) 2026-03-10 13:04:04 +05:30
Aryan
c61a264a65
Pdf reflow rework (#51)
* perf(pdf): native Pdfium-based reflow engine with auto-open

Migrate PDF-to-Markdown reflow generation from PDFBox to a custom
native implementation using Pdfium. This transition improves
processing speed by ~10x and significantly reduces memory overhead.

- Native JNI Bridge: Implemented `pdfium_bridge.cpp` using `dlopen`
  to hook into the existing `libpdfium.so` memory space.
- Optimized Extraction: Replaced character-by-character JNI calls
  with bulk array retrieval (`getPageFontSizes`, `getPageFontWeights`),
  drastically reducing JNI boundary overhead.
- Enhanced Accuracy: Improved Markdown formatting logic by using
  native font weight (bold) and relative font size variance (headers).
- Thread Safety: Refactored generator to process pages sequentially
  while synchronized with the global `PdfiumCore.lock` to ensure
  stability across concurrent UI operations.
- Seamless UX: Implemented a reactive auto-open system in the
  PDF viewer that tracks user intent and navigates to the reflow
  view immediately upon background task completion.

* Improved PDF to Markdown conversion and added cache cleanup.

- Implemented automated cleanup of imported file caches when deleting books.
- Enhanced `PdfToMarkdownGenerator` with support for font flags (italics), improved kerning, and smarter paragraph wrapping.
- Updated `NativePdfiumBridge` and C++ JNI code to extract font information flags from PDFium.

* Implemented seamless file switching and enhanced reflow transition logic.

Key changes include:
- Added `switchToFileSeamlessly` to `MainViewModel` to handle state transitions and navigation when switching between PDF and reflowed text views.
- Updated `generateAndImportReflowFile` to support automatic opening of the generated file at a specific page/chapter.
- Integrated `NavigationEvent` and `CompletableDeferred` to manage asynchronous navigation and state updates during file switches.
- Modified `EpubReaderScreen` and `PdfViewerScreen` to pass the current position when toggling between PDF and text modes.
- Updated `AppNavigation` to move navigation logic out of the `NavHost` and added loading overlays to viewers to improve UI feedback during transitions.
2026-03-10 10:59:44 +05:30
Aryan
acf282d4c7
General improvements (#50)
* Implemented long-press gestures(on the left and right region) for rapid scrolling(to top or bottom) in Musician Mode for both EPUB and PDF readers.

* Added support for book-specific reader settings and redesigned the format adjustment UI.

* perf: implement persistent caching and parallel parsing for single-file imports

- Replaced random UUID generation with bookId-based pathing in SingleFileImporter to enable cache reuse.
- Added a JSON metadata fast-path to return EpubBook objects instantly on subsequent opens for MD, TXT, and HTML.
- Parallelized Markdown chapter parsing using Coroutines (async/awaitAll) to leverage multicore CPUs.
2026-03-09 23:09:56 +05:30
Aryan
ef1bfdc57a
Pdf text highlight (#49)
* feat(pdf): implement native text highlighting and interactive selection menu

- Add `PdfUserHighlight` data model to track page index, character ranges, and normalized coordinates.
- Redesign `PdfSelectionMenuPopup` to match the EPUB reader style, featuring a color palette row and a deletion option.
- Integrate highlight rendering into the `PdfPageSelectionsLayer` using Canvas drawing.
- Add hit-testing to `detectTapGestures` to allow users to tap existing highlights to change colors or remove them.

* Implemented PDF highlight persistence, sync, and exporting.

* Improved PDF highlight exporting and visibility logic

- Fixed PDF highlight rendering by correctly calculating coordinates and merging adjacent rectangles into lines.
- Updated `PdfExporter` to include highlights in the exported document and added debug logging.
- Corrected visibility check in `PdfPageComposable` to account for vertical offsets.
- Enhanced `PdfViewerScreen` highlight creation to use merged line rectangles

* Refactored annotation synchronization logic and improved background sync reliability.

- Refactored JSON bundle creation and extraction into reusable helper functions.
- Improved stale file detection by checking all annotation types (ink, text, layout, highlights, text boxes).
- Added background annotation downloading to `SyncWorker`
- Implemented duplicate file cleanup in `GoogleDriveRepository` during uploads.
- Added a `showFeedback` flag to `syncFolderMetadata` to control UI visibility during background operations.
- Fixed a potential data loss edge case by aborting Firestore sync if the bundle upload fails.

* Improved highlight interaction and management in PDF viewer

- Implemented hit tolerance for highlight selection to improve touch detection accuracy.
- Added logic to shift highlight page indices when adding or deleting pages.
- Included highlights in the auto-pruning check for empty pages.
- Added a "Highlights" tab to the navigation drawer to list, navigate to, and delete user highlights.
2026-03-09 17:37:44 +05:30
Aryan
8c7c8cb48e
Feature/highlighter snap (#48)
* perf: fix Home and Library screen stutter by removing main thread file checks

* feat(pdf): implement straight-line highlighter snap

- Added "Straight Line" toggle to highlighter settings popup with persistent state.
- Implemented "rubber-band" drawing effect for highlighters with cardinal direction snapping (0°, 90°, 180°, 270°).
- Optimized gesture loops in Vertical and Paginated readers to respond instantly to setting toggles.
- Rewrote eraser hit detection using point-to-line segment distance math for pixel-perfect erasure of straight lines.
2026-03-08 20:19:59 +05:30
Aryan
6ea414c9b2
Expanded folder sync functionality to support multiple folders and improved performance. (#47)
- Added `SyncedFolder` data class and transitioned from a single `syncedFolderUri` to a list of `syncedFolders`.
- Implemented logic to add, remove, and persist multiple synced folders using JSON in shared preferences, including a migration path for legacy single-folder settings.
- Updated `FolderSyncWorker` to iterate through all registered folders and added an annotation sidecar preloading optimization to reduce file I/O during sync.
- Redesigned the "Folder Sync" UI in `LibraryScreen` to display a list of active folders with individual management options and a 3-folder limit.
- Refined permission handling to request both read and write access for synced folders.
2026-03-08 17:56:09 +05:30
Aryan
76780bff31
Offline dictionary (#45)
* Added support for external dictionary apps and a dictionary settings sheet.

* Refactored external dictionary integration and improved package visibility

 - Updated `AndroidManifest.xml` with `<queries>` for common dictionary apps and intent actions (`PROCESS_TEXT`, `SEARCH`, `SEND`) to support Android 11+ package visibility.
 - Refactored `ExternalDictionaryHelper` to streamline dictionary discovery using `Intent.ACTION_PROCESS_TEXT` and `colordict.intent.action.SEARCH`.
 - Added a package blocklist in `ExternalDictionaryHelper` to filter out system services (e.g., Samsung Pass, GMS) from dictionary lists.
  - Simplified `launchDictionary` logic to prioritize `PROCESS_TEXT` intents.
 - Fixed a bug in `PdfViewerScreen` to only show the dictionary upsell dialog when `useOnlineDictionary` is enabled.

* Refactored dictionary settings into a dialog and updated dictionary selection logic.

- Renamed `DictionarySettingsSheet` to `DictionarySettingsDialog` and converted it from a bottom sheet to a formal dialog.
- Redesigned the dictionary settings UI with a clearer distinction between AI and external app modes.
- Added a "Search" option to the external dictionary list that triggers a web search.
- Updated `ExternalDictionaryHelper` to include a package blocklist and support for generic web search intents.
- Simplified `PdfHelper` by removing Pro user checks for the "Dictionary" action.
- Updated icons for dictionary settings across the EPUB and PDF readers.
2026-03-08 15:19:52 +05:30
Aryan
dff236fa7f
feat(epub): overhaul border system to support individual sides and radii (#44)
- Refactored `BlockStyle` to replace unified border/radius fields with explicit properties for all four sides and corners.
- Overhauled `CssParser` to correctly handle CSS border shorthands (`border-bottom`, `border-width`, etc.) and multi-value `border-radius`.
- Implemented `drawCssBorders` custom modifier to render side-specific borders, styles (dashed/dotted), and background clipping.
- Updated `Paginator` measurement logic to calculate block height and splitting points based on individual side widths.
2026-03-08 10:31:07 +05:30
Aryan
68c4611187
Fixed a bug where app bars wouldn't show up when tapping the screen if Musician Mode was enabled but Auto-scroll was off. (#42) 2026-03-07 23:28:15 +05:30
Aryan
e78950e672
bump version to 1.0.35(build 36) (#41) 2026-03-07 22:52:42 +05:30
Aryan
6bc4f9bafd
fix: force disk fallback in LocatorConverter to fix MD/TXT reading position (#40)
Background pre-processing for single-file imports (MD/TXT) was generating empty DB cache entries because it only looked at RAM content. This caused position saves in Vertical Mode to fail. This fix ensures that an empty cache entry triggers a disk-read fallback to generate valid semantic blocks on-demand.
2026-03-07 22:34:08 +05:30
Aryan
b9f8825ad7
Added musician mode to EPUB and PDF readers, featuring tap-to-scroll regions and persistent state. Refactored auto-scroll lock functionality to support the new musician-oriented interface. (#39)
Added musician mode to EPUB and PDF readers, featuring tap-to-scroll regions and persistent state. Refactored auto-scroll lock functionality to support the new musician-oriented interface.
2026-03-07 21:28:15 +05:30
Aryan
3a31e4fc7b
Crash fixes (#38)
* Updated animation specifications for UI controls and overlays to use a 200ms tween duration.

* Implemented fallback file picker and improved CSS rule merging efficiency to fix OOM.
2026-03-07 19:40:50 +05:30
Aryan
77a09c545f
Added monochrome icon support (#37) 2026-03-07 17:37:41 +05:30
Aryan
1e879eb604
Pdf text reflow (#36)
* Implemented PDF reflow mode by introducing a mechanism to convert PDF content to Markdown/HTML for viewing in the EPUB reader.

Specific changes include:
- Added `PdfReflowGenerator` and `PdfToMarkdownGenerator` to handle PDF text extraction and conversion to reflowable formats.
- Updated `MainViewModel` with `toggleReflowMode` logic to switch between original PDF and reflowed views.
- Modified `RecentFileEntity` and `RecentFileDao` to persist user reflow preferences, including a Room database migration (v12 to v13).
- Updated `PdfViewerScreen` and `EpubReaderControls` to include UI options for toggling reflow mode.
- Integrated reflow preference check into the book opening workflow to automatically load the preferred view.
- Updated `AppNavigation` and `EpubReaderScreen` to support the new view switching state.

* Implemented background processing and incremental loading for PDF reflow mode.

- Added `reflowProgress` to `MainViewModel` to track and display PDF-to-Markdown conversion progress in the UI.
- Refactored `PdfToMarkdownGenerator` to generate a skeleton EPUB structure immediately while processing page content (text and images) asynchronously.
- Switched PDF text extraction to use `PDFBox` with optimized memory settings and JPEG compression for images.
- Implemented priority page processing in reflow mode, starting with the user's current page.
- Added "Clear Reflow Cache" debug option to the Home Screen.
- Enhanced `BookPaginator` to support lazy loading of chapter content from disk and improved cache hit detection.

* Refactored PDF Reflow Mode to generate standalone Markdown files instead of temporary EPUB books.

* perf(reflow): optimize PDF-to-Markdown conversion and fix viewing lag

- Re-architected PdfToMarkdownGenerator to use a single-pass stream (O(N) complexity), fixing performance bottlenecks and timeouts on large PDFs.
- Implemented "Virtual Chaptering" in SingleFileImporter for Markdown files to split content into page-level HTML files, eliminating UI lag during reading.
- Simplified ReflowWorker to delegate progress tracking and looping to the generator.
- Enhanced PdfViewerScreen with a prominent top-bar progress indicator and a completion snackbar with an "OPEN" action.

* Optimized EPUB parsing performance and fixed PDF viewer UI layout.

- Optimized `EpubParser` by implementing parallel chapter parsing using coroutines and a semaphore to limit concurrency.
- Reduced memory usage in `EpubParser` and `SingleFileImporter` by no longer storing full HTML content in memory for chapters.
- Updated `EpubXMLFileParser` to support an existing `Document` object to avoid redundant Jsoup parsing.
- Fixed an issue in `PdfViewerScreen` where the snackbar was appearing under the bottom app bar.
2026-03-07 16:10:34 +05:30
Aryan
8f52549c19
Txt file fix (#35)
* Fixed virtualization data indexing and improved text file to EPUB conversion logic.

- Corrected array indexing for `chunksData` and `chunkHeights` in `epub_reader.js` to prevent overwriting entire arrays.
- Refined virtualization intersection observer to properly restore and unload chunk content using index-based caching.
- Updated `SingleFileImporter.kt` to convert plain text into structured HTML paragraphs instead of a single `pre` tag.
- Enhanced CSS styles for imported single-file documents and added HTML entity escaping.

* Adjusted text layout and enhanced pagination mismatch logging

*   Configured `PlatformTextStyle` and `LineHeightStyle` to improve text measurement consistency.
*   Updated `checkLayoutMismatch` to include text snippets and handle zero expected height.
*   Refined `Modifier` application order in the reader view.
*   Ensured `maxHeight` is set to `Infinity` during text measurement in `Paginator`.
2026-03-06 14:06:29 +05:30
Aryan
506f60473c
fix(paginator): resolve page overflow and layout mismatches (#34)
- Enforce strict height and aspect ratio for Math and Image blocks.
- Align Paragraph padding, width math, and text alignment with the UI.
- Strip bottom margins on last blocks and use roundToInt for precision.
- Add expectedHeight diagnostics to detect and log UI overflows.
2026-03-05 21:42:57 +05:30
Aryan
7e28c1c2b3
Folder pdf annotation sync (#32)
* Implemented folder-based annotation synchronization and legacy book ID migration.

- Added `syncLocalAnnotationsToFolder` and `importAnnotationBundle` to `RecentFilesRepository` to handle bundling ink, rich text, layouts, and text boxes into a single JSON sidecar file.
- Introduced `saveAnnotationSidecar` and `getAnnotationSidecar` in `LocalSyncUtils` to manage hidden synchronization files in linked folders using SAF.
- Updated `MainViewModel` to trigger annotation syncing on book close and added a migration utility for legacy book IDs.
- Enhanced `FolderSyncWorker` to include a dedicated phase for importing newer annotation bundles from synchronized folders.
- Fixed an ID mismatch edge case in `PdfViewerScreen` by initiating data migration when a legacy ID is detected.
- Added `selectedBookId` to `ReaderScreenState` to better track the active document across the application.

* fix(sync): resolve Syncthing file lock conflicts and annotation migration bug

- Implement atomic saves (write-to-temp then rename) for annotation sidecars in `LocalSyncUtils` to prevent `.tmp` file locking and partial writes when using third-party sync tools like Syncthing.
- Add robust conflict resolution for annotation sidecars (`resolveAndCleanAnnotationConflicts`) to automatically detect, keep the newest version, and clean up `.sync-conflict` files.
- Fix a bug in `MainViewModel.checkAndMigrateLegacyBookId` where older legacy local files would blindly overwrite newly synced annotation files by adding a timestamp-based clobber check.
2026-03-05 16:34:22 +05:30
Aryan
0b7bb53a28
Auto scroll update (#28)
* Updated auto-scroll controls UI and refined pause behavior.

- Added semi-transparent look to auto-scroll
- Reduced auto-scroll temporary pause duration from 1000ms to 300ms.
- Updated `AutoScrollControls` styling with background transparency and adjusted elevations/borders.
- Refined `CircularProgressIndicator` visibility to only show when active and paused.
- Enhanced the `Slider` appearance in `AutoScrollControls` with a custom track and thumb.
- Improved play/pause logic in `PdfViewerScreen` to properly reset temporary pause states and jobs.
- Cleaned up redundant comments and formatting in `EpubReaderControls.kt`.

* feat: add file-specific auto-scroll speed profiles for EPUB and PDF

- Updated AutoScrollControls UI with a dropdown to toggle between Global and Local speed modes.
- Implemented persistent local auto-scroll settings (Current, Min, and Max speed) keyed by book ID.
- Ensured "Local mode" preference is sticky per-file, while maintaining Global defaults for new files.

* Enabled auto-scroll toggling via single tap in EPUB and PDF readers
2026-03-04 16:40:02 +05:30
Aryan
b47b6a9164
Added stylus-only mode for PDF drawing and annotations. (#27)
This change introduces a "Stylus Only Mode" toggle in the annotation dock, allowing users to restrict drawing input to stylus pens while maintaining touch support for scrolling and navigation.

Key changes include:
- Added `isStylusOnlyMode` state and persistence logic in `PdfViewerScreen`.
- Updated `AnnotationDock` with a toggle button for the new mode.
- Modified pointer input handling in `PdfPageComposable` and `PdfVerticalReader` to filter touch events when stylus-only mode is active.
- Adjusted tap gesture detection to ensure scrolling and page clicks still function correctly under various input modes.
2026-03-04 13:18:26 +05:30
Aryan
d459535ffd
docs: add CLA and CONTRIBUTING guidelines (#26) 2026-03-04 10:19:17 +05:30
Aryan
3dc1843801
Tts upgrade (#25)
* enable cloud tts but only in pro(flavor) debug mode for testing

* Added a device voice settings sheet to allow users to select and preview system-level TTS voices.

* Refactored `DeviceVoiceSettingsSheet` to improve voice selection and filtering, and updated `BaseTtsSynthesizer` for better language handling.
2026-03-04 10:16:32 +05:30
Aryan
1ce353ad44
Epub page turn animation (#23)
* Added realistic page turn animation option in epub pagination mode

* Added volume key navigation support for paginated render mode and added page turn animation to "tap to change page" and "volume button to change page"
2026-03-03 14:55:50 +05:30
Aryan
7d26e10c07
Folder sync patch (#22)
* Refactored folder synchronization logic and improved migration handling

- Updated `MainViewModel` to skip synchronization until folder migration is completed and added metadata syncing when opening books.
- Modified folder migration to detach existing folder books (converting them to standard local files) before starting a fresh scan.
- Added `detachAllFolderBooks` to `RecentFileDao` and `RecentFilesRepository` to facilitate the migration process.
- Updated `MetadataExtractionWorker` to sync local metadata to the folder immediately after extraction.
- Simplified `FolderSyncWorker` by removing legacy migration lookups and streamlining the reconciliation of local and remote metadata.
- Updated `FolderMigrationDialog` UI text to reflect that books are now read directly from folders without duplication.
- Fixed various indentation and formatting issues across several files.

* Removed the `.episteme` sync directory and moved book metadata files directly to the folder root as hidden files.
2026-03-02 13:15:34 +05:30
Aryan
0885b6949e
Refactored folder synchronization logic and improved migration handling (#21)
- Updated `MainViewModel` to skip synchronization until folder migration is completed and added metadata syncing when opening books.
- Modified folder migration to detach existing folder books (converting them to standard local files) before starting a fresh scan.
- Added `detachAllFolderBooks` to `RecentFileDao` and `RecentFilesRepository` to facilitate the migration process.
- Updated `MetadataExtractionWorker` to sync local metadata to the folder immediately after extraction.
- Simplified `FolderSyncWorker` by removing legacy migration lookups and streamlining the reconciliation of local and remote metadata.
- Updated `FolderMigrationDialog` UI text to reflect that books are now read directly from folders without duplication.
- Fixed various indentation and formatting issues across several files.
2026-03-02 03:03:36 +05:30
Aryan
34c6ec3fef
Auto scroll update (#20)
* Added configurable min/max speed settings for auto-scroll in EPUB and PDF readers

* bump version to 1.0.33 (34)
2026-03-02 00:07:01 +05:30
Aryan
d6837aa4df
General fixes (#19)
* fix OOM crash by refactoring EpubImage to use lazy loading

- Removed raw image ByteArray from EpubImage data class to prevent OutOfMemoryErrors on large books.
- Updated EpubParser and MobiParser to only store image paths in the EpubBook object.
- Images are now loaded on-demand from disk via file URIs in WebView and Coil, reducing initial heap allocation.

* fix(tts): resolve OutOfMemoryError by removing large strings from state bundle

- Removed 'currentText' from the TtsState bundle inside MediaSession custom layout.
- Updated TtsController to retrieve the current text chunk via MediaItem metadata.
- This prevents heap exhaustion caused by high-frequency serialization of large text strings during word tracking and polling updates.
2026-03-01 23:24:26 +05:30
Aryan
a81df6921d
Folder import\sync rework (#18)
* feat: rework Folder Sync architecture to separate Managed vs Linked books

- Introduced "Managed" (imported to app storage) vs "Linked" (SAF URI) book logic.
- Disabled Google Drive/Metadata synchronization for Folder-Linked books to respect privacy and storage.
- Updated deletion logic: Folder books are now marked as deleted in the DB to blacklist them from future auto-scans, while Managed books are permanently purged from local and cloud storage.
- Enhanced folder sync discoverability by adding a direct "Sync Folder" navigation button in Home screen.
- Implemented reactive pager navigation in MainScreen and LibraryScreen via LaunchedEffect to allow programmatic tab switching from the ViewModel.

* Implemented a local folder synchronization system to track and update book metadata across devices.

Key changes:
- Added `FolderBookMetadata` and `LocalSyncUtils` for serializing and managing metadata files in a `.episteme` directory.
- Implemented bidirectional sync in `FolderSyncWorker` to reconcile local database state with folder-based metadata using timestamps and Syncthing conflict resolution.
- Updated `MainViewModel` to trigger folder metadata sync when closing a book and verify for remote updates upon opening.
- Enhanced folder management with manual scan support via `WorkManager` and automatic cleanup of database entries when a folder is disconnected.
- Added `RecentFileDao` methods to support bulk deletion and prefix-based file lookups.

* Removed API 34 restriction for chapter processing and updated local folder sync directory name

* Increased TTS timeouts, added edge-to-edge support in MainScreen, and improved TtsChunk mapping safety

* Improved folder synchronization and metadata management.

- Added metadata-only sync option and triggered it on app start.
- Implemented hidden metadata filenames (prefixed with `.`) to reduce file clutter.
- Added automatic creation of `.nomedia` files in the sync directory.
- Enhanced sync conflict resolution by picking the latest metadata and cleaning up obsolete or orphaned files.
- Added "Sync Metadata" button to the Library screen.
- Updated UI labels for local folder sync to clarify Google Drive integration.
- Refactored `FolderSyncWorker` to support targeted metadata-only synchronization.

* Implement folder sync migration and refactoring

- Added a migration dialog to inform users about the folder sync refactor, where books are now read directly from external storage.
- Updated `MainViewModel` to handle migration state and trigger a full scan upon completion or dismissal of the dialog.
- Modified `FolderSyncWorker` to support legacy book matching during migration, updating file URIs and cleaning up internal app storage for migrated books.
- Improved synchronization logic between local and remote metadata, including cleanup of orphaned metadata files.
- Refined `RecentFileItem` updates during sync to preserve progress and bookmarks based on last modified timestamps.

* Implemented pull-to-refresh for library sync and enhanced folder file deletion.

- Added `isRefreshing` state to `MainViewModel` and integrated `PullToRefreshBox` in `HomeScreen`.
- Implemented `refreshLibrary` to trigger cloud and folder metadata synchronization.
- Updated deletion logic to physically remove files and metadata from synced local folders.
- Added a warning to the delete confirmation dialog when removing folder-synced items.
- Improved folder sync reliability by performing lazy cleanup of missing files during interaction and sync.
- Fixed a bug where sync loading indicators would not retract on failure or cancellation.

* Improved bookmark navigation and scroll synchronization in EPUB reader

- Refined bookmark navigation logic for vertical scroll mode to handle chunk injection more reliably.
- Added `isNavigatingToBookmark` state to show a loading overlay during long jumps.
- Implemented `onScrollFinished` callback in `CfiJsBridge` to synchronize UI state with WebView scroll completion.
- Updated `ChapterWebView` to use `rememberUpdatedState` for JavaScript bridge callbacks to ensure data consistency.
- Improved `getCurrentCfi` and `scrollToCfi` in `epub_reader.js` with better visibility probing and retry logic for detached nodes.

* Implemented background metadata extraction for folder sync.

Key changes:
- Added `MetadataExtractionWorker` to handle heavy metadata and cover extraction for files in the background.
- Refactored `FolderSyncWorker` to perform fast file discovery using placeholders, enqueuing the metadata worker upon completion.
- Added `getFolderBooksWithoutCovers` query to `RecentFileDao`.
- Updated UI components (`EmptyState`, `MainViewModel`) to improve user feedback during sync and provide clear setup actions.
- Enhanced `EmptyState` composable to support secondary actions and custom button text.

* Updated Library Screen UI
2026-03-01 22:57:53 +05:30
Aryan
60f6566b31
use HTML for fastlane full description (#15) 2026-02-27 21:59:10 +05:30
Aryan
b32b13f533
Fdroid patch (#14)
* build: remove foojay-resolver-convention plugin for f-droid compliance

* add fastlane metadata structure for F-Droid

* add app icon, feature graphic, and screenshots to fastlane metadata
2026-02-27 17:51:06 +05:30
Aryan
7c8452c137
Fdroid patch (#13)
* build: remove foojay-resolver-convention plugin for f-droid compliance

* add fastlane metadata structure for F-Droid
2026-02-27 16:33:09 +05:30
Aryan
13245aa502
build: remove foojay-resolver-convention plugin for f-droid compliance (#12) 2026-02-27 15:08:39 +05:30
Aryan
eda8397043
Remove brotli test binaries for F-Droid compliance (#11) 2026-02-27 14:08:10 +05:30
Aryan
5483b18549
refactor: remove local pdfiumandroid module and use published artifact (#10)
Key changes:
*   The `pdfiumandroid` directory, which contained the local library source, has been completely removed.
*   The `settings.gradle.kts` file is updated to remove the `:pdfiumandroid` and `:pdfiumandroid:arrow` includes.
*   The main `app/build.gradle.kts` is modified to depend on the published `io.legere:pdfiumandroid:1.0.35` artifact from a remote repository instead of the local project module.
*   Code in `PdfPageComposable.kt` that depended on `PdfPageObjectType` and logic for handling image objects in dark mode has been removed, simplifying the rendering process.
2026-02-27 13:44:52 +05:30
Aryan
ea31765612
feat(pdf-viewer): implement pan lock to disable horizontal movement (#9)
- Add `isScrollLocked` state to `PdfViewerScreen` to toggle panning behavior.
- Replace "Import SVG" debug icon with a Lock/Unlock toggle in the Top App Bar.
- Update `PdfVerticalReader` and `PdfPageComposable` to strictly zero out X-axis pan deltas and fling velocities when locked.
- Maintain zoom and vertical scrolling functionality while panning is locked.
2026-02-26 20:05:45 +05:30
Aryan
f2daebe0a5
Update GitHub sponsor button with a username (#8) 2026-02-26 18:44:11 +05:30
Aryan
de376e2ace
Auto scroll update (#7)
* updated auto-scroll logic for EPUB and PDF

* Refactored auto-scroll to use temporary debounced pauses instead of hard stops on manual interaction.
* Updated tap handling to allow toggling bars without interrupting scroll.
* Added a 2-second orientation pause on EPUB chapter transitions.
* Enhanced AutoScrollControls UI with circular progress overlay to indicate the "temporarily paused" state.

* Refactored auto-scroll controls

This commit refactors the auto-scroll controls for both EPUB and PDF readers, introducing a more advanced and user-friendly interface.

Key changes:
- Redesigned the auto-scroll controls UI into a collapsible and lockable card.
- Added a "lock" feature to hide controls during scrolling.
- Introduced an alternative slider-based input for speed adjustment, which can be toggled.
- Persisted the lock and input mode states in SharedPreferences.
- Improved the EPUB auto-scroll mechanism using `translate3d` for smoother sub-pixel scrolling.
2026-02-26 17:16:01 +05:30
Aryan
1f111034f1
Added customizable highlight color palette in epub (#6)
This introduces a user-configurable palette for text highlighting. The four default highlight colors can now be customized by the user from an expanded set of predefined colors.

Changes include:
- Added a `PaletteManagerDialog` to allow users to select and save their preferred highlight colors.
- Implemented `saveHighlightPalette` and `loadHighlightPalette` to persist the user's choices.
- The highlighting UI in both vertical and paginated readers now displays the active custom palette.
- Added new `HighlightColor` options.
- Updated JavaScript to support the expanded color set and improve highlight interaction logic.
2026-02-26 14:26:54 +05:30
Aryan
1b048c9073
Pdf auto scroll (#5)
* docs: Revamp README and add APK naming convention

This commit introduces a complete overhaul of the `README.md` to improve project presentation. Key changes include:
*   Adds a new header with the app icon and a Google Play badge.
*   Updates the feature graphic and includes a note distinguishing the OSS version from the Play Store version.
*   Refines the "Open Source Libraries" section to be more structured.
*   Moves the main preview image into the `docs` directory.

Additionally, the `app/build.gradle.kts` file is updated to configure a standardized naming convention for output APK files, including flavor, version, and build type.

* refactor copyright headers and fix README icon alignment

This commit introduces two main changes across the codebase:

The `spotless/copyright.kt` template have been updated for consistency:
*   The author name is simplified from "Episteme Authors" to "Episteme".
*   The contact email prefix is shortened from "Electronic mail:" to "mail:".

Second, the `README.md` file is adjusted to correct the vertical alignment of the app icon with the project title.

* Added auto-scroll feature for PDF vertical reader
2026-02-26 10:21:17 +05:30
Aryan
1f35cd8138
Fix icon and name alignment in readme (#4) 2026-02-25 21:34:06 +05:30
Aryan
c6363f3061
Update readme (#3)
docs: Revamp README and add APK naming convention

This commit introduces a complete overhaul of the `README.md` to improve project presentation. Key changes include:
*   Adds a new header with the app icon and a Google Play badge.
*   Updates the feature graphic and includes a note distinguishing the OSS version from the Play Store version.
*   Refines the "Open Source Libraries" section to be more structured.
*   Moves the main preview image into the `docs` directory.

Additionally, the `app/build.gradle.kts` file is updated to configure a standardized naming convention for output APK files, including flavor, version, and build type.

* refactor copyright headers and fix README icon alignment

This commit introduces two main changes across the codebase:

The `spotless/copyright.kt` template have been updated for consistency:
*   The author name is simplified from "Episteme Authors" to "Episteme".
*   The contact email prefix is shortened from "Electronic mail:" to "mail:".

Second, the `README.md` file is adjusted to correct the vertical alignment of the app icon with the project title.
2026-02-25 21:30:28 +05:30
Aryan
92c2bf2822
docs: Revamp README and add APK naming convention (#2)
This commit introduces a complete overhaul of the `README.md` to improve project presentation. Key changes include:
•   Adds a new header with the app icon and a Google Play badge.
•   Updates the feature graphic and includes a note distinguishing the OSS version from the Play Store version.
•   Refines the "Open Source Libraries" section to be more structured.
•   Moves the main preview image into the `docs` directory.

Additionally, the `app/build.gradle.kts` file is updated to configure a standardized naming convention for output APK files, including flavor, version, and build type.
2026-02-25 19:54:43 +05:30
Aryan
8b5dd8e78a
Merge pull request #1 from Aryan-Raj3112/setup-oss-docs
docs: add README, LICENSE, and configure automated license headers
2026-02-25 16:58:49 +05:30