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 #4517

Parent PR #4516

Continuing from #4516

  • Migrated the IntroScreen functionality to use DataStore.
  • Refactored all related UI test cases to use DataStore instead of SharedPreferences.
  • Added a migration test case to verify the transfer of data from SharedPreferences to DataStore.

* Created the `KiwixDataStore` and `SharedPreferenceToDatastoreMigrator` classes to handle the migration of existing `SharedPreferences` data to `DataStore`.
* Migrated the currently opened ZIM file and the currently opened tab to `DataStore`.
* Migrated the `TextZoom` value to `DataStore` (the zoom level configured by the user for reading ZIM files).
* Added `DataStore` dependency in our project.
…erences`.

* Migrated the `BackToTop` functionality to use dataStore.
* Migrated the `OpenInNewTab` functionality to use dataStore.
* Migrated the `ExternalLinkPopup` functionality to use dataStore.
* Refactored the `ExternalLinkOpenerTest` according to dataStore.
* Migrated the `PrefWifiOnly` functionality to use dataStore.
* Refactored the `ThemeConfigTest`.
…edPreferences`.

* Added `SharedPreferenceToDatastoreMigratorTest` to properly verify the migration process.
…rences`.

* Migrated the `IntroScreen` functionality to use DataStore.
* Refactored all related UI test cases to use `DataStore` instead of `SharedPreferences`.
* Added a migration test case to verify the transfer of data from `SharedPreferences` to `DataStore`.
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 65.20000% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.01%. Comparing base (0b14cf6) to head (77a0f69).

Files with missing lines Patch % Lines
...kiwixmobile/core/utils/datastore/KiwixDataStore.kt 65.51% 12 Missing and 8 partials ⚠️
...estination/library/online/OnlineLibraryFragment.kt 20.83% 15 Missing and 4 partials ⚠️
...kiwixmobile/core/main/reader/CoreReaderFragment.kt 29.41% 3 Missing and 9 partials ⚠️
...kiwix/kiwixmobile/core/utils/ExternalLinkOpener.kt 10.00% 9 Missing ⚠️
...rg/kiwix/kiwixmobile/core/main/CoreMainActivity.kt 0.00% 6 Missing ⚠️
.../kiwixmobile/core/settings/CoreSettingsFragment.kt 20.00% 2 Missing and 2 partials ⚠️
...wix/kiwixmobile/core/settings/SettingsPresenter.kt 42.85% 4 Missing ⚠️
.../kiwixmobile/core/extensions/FragmentExtensions.kt 50.00% 1 Missing and 2 partials ⚠️
...obile/core/settings/viewmodel/SettingsViewModel.kt 93.33% 3 Missing ⚠️
...loader/downloadManager/DownloadManagerRequester.kt 60.00% 0 Missing and 2 partials ⚠️
... and 5 more

❌ Your patch check has failed because the patch coverage (65.20%) 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    #4518      +/-   ##
============================================
+ Coverage     58.96%   59.01%   +0.05%     
- Complexity     1520     1541      +21     
============================================
  Files           324      327       +3     
  Lines         17500    17640     +140     
  Branches       2179     2185       +6     
============================================
+ Hits          10318    10411      +93     
- Misses         5757     5796      +39     
- Partials       1425     1433       +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.

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 the IntroScreen to use DataStore instead of SharedPreferences.

3 participants