Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Still displaying old storage configurator (at first download). #4051

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Nov 4, 2024

Fixes #4047

  • We have removed the "Download book to internal storage?" dialog and updated the "Storage configured" dialog to show the new UI, matching what we have in the "Settings" screen.
  • Unused code and strings have been removed from our codebase.
  • Created a StorageDeviceExtensions to calculate free and used space, the used percentage, and to retrieve the storage path and title. Since this code was used in both KiwixPrefsFragment and StorageViewHolder, we created this extension to reduce code duplication.
  • Refactored InitialDownloadTest to align with our new changes.
  • Displaying the storage selection dialog for configuration if an SD card is available at first download. If only internal storage is available, proceed directly with the ZIM file download, as showing the configuration dialog is unnecessary in this case.

This video is for reference of how our UI will show.

XRecorder_04112024_223216_001.mp4

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft November 4, 2024 17:22
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 58.82%. Comparing base (1576095) to head (f9e4c29).

Files with missing lines Patch % Lines
...va/eu/mhutti1/utils/storage/StorageSelectDialog.kt 60.00% 4 Missing and 4 partials ⚠️
...e/nav/destination/library/OnlineLibraryFragment.kt 57.14% 2 Missing and 1 partial ⚠️
...g/kiwix/kiwixmobile/settings/KiwixPrefsFragment.kt 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4051      +/-   ##
============================================
+ Coverage     57.84%   58.82%   +0.97%     
- Complexity     1515     1540      +25     
============================================
  Files           315      316       +1     
  Lines         13161    13192      +31     
  Branches       1676     1680       +4     
============================================
+ Hits           7613     7760     +147     
+ Misses         4448     4329     -119     
- Partials       1100     1103       +3     

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

…rd is available at first download. If only internal storage is available, proceed directly with the ZIM file download, as showing the configuration dialog is unnecessary in this case.
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review November 5, 2024 06: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.

Still displaying old storage configurator (at first download)
2 participants