- Introduced `LockFile` data class to manage sync status and ownership.
- Enumerated `SyncStatus` to clearly indicate the stage of synchronization: Pending, Syncing, or Success.
- Implemented a new `beforeSync` method utilizing `OkHttpClient` for secure HTTP calls to manage the lock file.
- Added JSON serialization for lock file management and status updates.
- Implemented exponential backoff strategy to handle concurrent sync attempts and reduce race conditions.
- Added comprehensive logging for debugging and monitoring sync processes.
This update enhances the reliability and concurrency handling of SyncYomi's synchronization process, ensuring users experience seamless and efficient data syncing in a self-hosted environment.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
- Refactored beforeSync() to incorporate a robust locking mechanism.
- Added backoff strategy to handle race conditions during concurrent sync attempts.
- Ensured single instance of sync data file on Google Drive to prevent duplication.
- Optimized lock file checking and handling for efficient synchronization process.
This update significantly improves the reliability and efficiency of the syncing process by preventing race conditions and ensuring that synchronization actions are atomic.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
Wasn't working correctly in release build, _probably_ because of R8 despite kotlin-reflect
shipping with Proguard rules and us already keeping all Tachiyomi classes.
- In case you want a backup of just settings?
- Also disable backup options if dependent option is disabled (and fix being able to toggle disabled items)
- Also fix crash in RestoreBackupScreen due to attempt to parcelize Uri
- Make restore validation message a bit nicer
Closes#10257
We show a warning banner in the extensions list and also rely on the system
alert popup if someone attempts to install without the permission already
granted.
I think when library get updated so will last_modified_at field since one of the field in the row changes and the trigger get triggered, so it's best to ignore it if the only difference is last_modified_at.
Signed-off-by: KaiserBh <kaiserbh@proton.me>