WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@MohitMaliFtechiz
Copy link
Collaborator

Fixes #4521

Parent PR #4520

Continuing from #4520

  • Migrated the PREF_BOOKMARKS_MIGRATED to dataStore.
  • Migrated the PREF_RECENT_SEARCH_MIGRATED to dataStore.
  • Migrated the PREF_NOTES_MIGRATED to dataStore.
  • Migrated the PREF_HISTORY_MIGRATED to dataStore.
  • Migrated the PREF_APP_DIRECTORY_TO_PUBLIC_MIGRATED to dataStore.
  • Migrated the PREF_BOOK_ON_DISK_MIGRATED to dataStore.
  • Added a migration test case to verify the transfer of data from SharedPreferences to DataStore.
  • Removed unused methods from SharedPreferenceUtil.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 55.38462% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.01%. Comparing base (664ca35) to head (c4d7e6c).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...kiwixmobile/core/utils/datastore/KiwixDataStore.kt 52.77% 11 Missing and 6 partials ⚠️
...ixmobile/migration/data/ObjectBoxToRoomMigrator.kt 0.00% 7 Missing ⚠️
...bile/migration/data/ObjectBoxToLibkiwixMigrator.kt 0.00% 5 Missing ⚠️

❌ Your patch status has failed because the patch coverage (55.38%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4522      +/-   ##
============================================
- Coverage     59.04%   59.01%   -0.04%     
- Complexity     1538     1544       +6     
============================================
  Files           327      327              
  Lines         17623    17660      +37     
  Branches       2183     2183              
============================================
+ Hits          10406    10422      +16     
- Misses         5777     5790      +13     
- Partials       1440     1448       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… etc, to use Datastore instead of SharedPreferences.

* Migrated the `PREF_BOOKMARKS_MIGRATED` to dataStore.
* Migrated the `PREF_RECENT_SEARCH_MIGRATED` to dataStore.
* Migrated the `PREF_NOTES_MIGRATED` to dataStore.
* Migrated the `PREF_HISTORY_MIGRATED` to dataStore.
* Migrated the `PREF_APP_DIRECTORY_TO_PUBLIC_MIGRATED` to dataStore.
* Migrated the `PREF_BOOK_ON_DISK_MIGRATED` to dataStore.
* Added a migration test case to verify the transfer of data from `SharedPreferences` to `DataStore`.
* Removed unused methods from `SharedPreferenceUtil`.
@kelson42 kelson42 merged commit 3afdd2f into main Dec 9, 2025
32 checks passed
@kelson42 kelson42 deleted the Fixes#4521 branch December 9, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate prefIsBookmarksMigrated, prefIsRecentSearchMigrated, etc, to use Datastore instead of SharedPreferences.

4 participants