book-reader/app/src/main/java/com/aryan/reader
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
..
data Folder pdf annotation sync (#32) 2026-03-05 16:34:22 +05:30
epub General fixes (#19) 2026-03-01 23:24:26 +05:30
epubreader Auto scroll update (#28) 2026-03-04 16:40:02 +05:30
feedback Update readme (#3) 2026-02-25 21:30:28 +05:30
paginatedreader Epub page turn animation (#23) 2026-03-03 14:55:50 +05:30
pdf Folder pdf annotation sync (#32) 2026-03-05 16:34:22 +05:30
tts Tts upgrade (#25) 2026-03-04 10:16:32 +05:30
ui/theme Update readme (#3) 2026-02-25 21:30:28 +05:30
AppNavigation.kt Folder import\sync rework (#18) 2026-03-01 22:57:53 +05:30
BookImporter.kt Update readme (#3) 2026-02-25 21:30:28 +05:30
Common.kt Tts upgrade (#25) 2026-03-04 10:16:32 +05:30
FileHasher.kt Update readme (#3) 2026-02-25 21:30:28 +05:30
FolderSyncWorker.kt Folder pdf annotation sync (#32) 2026-03-05 16:34:22 +05:30
FontsScreen.kt Update readme (#3) 2026-02-25 21:30:28 +05:30
HomeScreen.kt Refactored folder synchronization logic and improved migration handling (#21) 2026-03-02 03:03:36 +05:30
LibraryScreen.kt Folder import\sync rework (#18) 2026-03-01 22:57:53 +05:30
MainActivity.kt Update readme (#3) 2026-02-25 21:30:28 +05:30
MainScreen.kt Folder import\sync rework (#18) 2026-03-01 22:57:53 +05:30
MainViewModel.kt Folder pdf annotation sync (#32) 2026-03-05 16:34:22 +05:30
MetadataExtractionWorker.kt Folder sync patch (#22) 2026-03-02 13:15:34 +05:30
MyApplication.kt Update readme (#3) 2026-02-25 21:30:28 +05:30
ProScreen.kt Update readme (#3) 2026-02-25 21:30:28 +05:30
SharedComposables.kt Folder import\sync rework (#18) 2026-03-01 22:57:53 +05:30