Rewrite import and export subscriptions functionality using coroutines
What is it?
- [ ] Bugfix (user facing)
- [x] Feature (user facing)
- [x] Codebase improvement (dev facing)
- [ ] Meta improvement to the project (dev facing)
Description of the changes in your PR
- Implement the subscription import/export functionality using
CoroutineWorkerfor better performance and readability of the code. - Make the import process cancellable (exporting usually completes too quickly to show a notification).
- Read/write subscription data using the Kotlinx Serialization library and plugin.
- Update WorkManager from 2.8.1 to 2.10.0 (changelog)
- Update the compile SDK to 35 (required by WorkManager).
Before/After Screenshots/Screen Record
Export
- Before:
Screen_recording_20241129_071419.webm
Android 6.0
- After:
Screen_recording_20241129_064527.webm
Android 6.0
https://github.com/user-attachments/assets/db72de5f-c263-4365-8f3e-cd4458df533d
Android 15
Fixes the following issue(s)
- Fixes #
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence
- [x] I read the contribution guidelines.
Quality Gate passed
Issues
6 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
I rebased on current refactor, and added a commit which kotlin-ifies the SubscriptionImportWorker input data a little, turning them into a sealed class that auto-parcelizes.
Unfortunately, there is no Data.Builder().fromParcelable() or similar, so the Data conversion has to be done manually still, but I centralized it in the sealed class so it should be straightforward as well.
Once the missing error handling is added on import & the question about how leniently to parse the json is resolved, I’d say LGTM!
Quality Gate passed
Issues
10 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
10 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code