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

Added the file picker in play store variant for move or copy the zim files in application's public directory #3979

Merged
merged 11 commits into from
Sep 5, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Aug 26, 2024

Fixes #3941

  • Added the file picker in the playStore variant to copy/move the zim files in the application's public directory so that the user can read those sideloaded zim files in the PS variant.
  • Fixed the OnBackInvokedCallback, which was not enabled for the application.
  • Fixed some memory leaks of SearchFragment, KiwixPrefFragment, and LanguageFragment.
  • Added the unit and instrumentation test cases for testing the whole functionality with edge cases.
screen-20240903-183347.mp4

The above video shows the whole functionality.

  • At first launch if the user clicks on the cancel button it will again show the permission dialog.
  • When the user clicks on the copy or move button in the permission dialog then it starts copying or moving the zim file based on the user's action, and it will not show the permission dialog again.
  • In the third attempt I clicked on the move button so the zim file is moved from the location to the public directory as you can see in the last effort the zim file is not showing on the selected location.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft August 26, 2024 12:55
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 48.20359% with 173 lines in your changes missing coverage. Please review.

Project coverage is 57.73%. Comparing base (992ebc9) to head (e5d7b2a).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...ile/nav/destination/library/CopyMoveFileHandler.kt 51.47% 85 Missing and 30 partials ⚠️
...le/nav/destination/library/LocalLibraryFragment.kt 25.00% 39 Missing ⚠️
...rg/kiwix/kiwixmobile/core/search/SearchFragment.kt 27.27% 1 Missing and 7 partials ⚠️
...kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt 65.00% 7 Missing ⚠️
...org/kiwix/kiwixmobile/language/LanguageFragment.kt 50.00% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3979      +/-   ##
============================================
- Coverage     57.81%   57.73%   -0.08%     
- Complexity     1572     1575       +3     
============================================
  Files           310      311       +1     
  Lines         12549    12865     +316     
  Branches       1590     1641      +51     
============================================
+ Hits           7255     7428     +173     
- Misses         4246     4347     +101     
- Partials       1048     1090      +42     

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

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review September 3, 2024 13:32
* Improved the showing of progressBar to inform the user about the copy/moving progress.
…ct API fails to move the document, a fallback method will copy the source file and delete the original file, ensuring a smooth user experience.

* Improved file copying performance: To enhance copy speed, we now use FileChannel for copying files, which is faster than the standard InputStream operation.
* Using the error message from string file instead of a hardcoded string.
…properly test the all scenario with edge cases.
@kelson42 kelson42 merged commit 32d36d7 into main Sep 5, 2024
8 of 9 checks passed
@kelson42 kelson42 deleted the Fixes#3941 branch September 5, 2024 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants