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: Sometimes setting the org.kiwix.libzim.Archive.setNativeArchive crashes the application. #3807

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Apr 26, 2024

Fixes #3805

  • We are now creating the ZimFileReader object on the background thread to not block the UI thread which sometimes causes the ANR because sometimes UI was frozen due to the creation of ZimFileReader with a large file.
  • Refactored our functionality to support this new change.
  • Refactored the test cases according to this functionality.
  • Added the test cases, for testing the scenario where the zim file was not properly loading after opening the note on the notes screen to ensure that this functionality should work properly.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft April 26, 2024 13:24
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 57.35294% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 53.19%. Comparing base (16048ed) to head (89a5a9a).

Files Patch % Lines
...org/kiwix/kiwixmobile/core/reader/ZimFileReader.kt 48.00% 12 Missing and 1 partial ⚠️
...le/nav/destination/library/LocalLibraryFragment.kt 0.00% 7 Missing ⚠️
.../kiwix/kiwixmobile/core/main/CoreReaderFragment.kt 45.45% 1 Missing and 5 partials ⚠️
...iwix/kiwixmobile/core/reader/ZimReaderContainer.kt 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3807      +/-   ##
============================================
+ Coverage     52.95%   53.19%   +0.23%     
- Complexity     1307     1310       +3     
============================================
  Files           292      292              
  Lines         11017    11047      +30     
  Branches       1464     1468       +4     
============================================
+ Hits           5834     5876      +42     
+ Misses         4212     4196      -16     
- Partials        971      975       +4     

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

…ve` crashes the application.

* We are now creating the ZimFileReader object on the background thread to not block the UI thread which sometimes causing the ANR because UI was frozen due to creation of ZimFileReader with large file.
* Refactored our functionality to support this new change.
* Refactored the test cases according to this functionality.
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review April 26, 2024 13:47
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft April 26, 2024 13:47
* Fixed when we opens the `Note dialog` from Note screen and came back to reader screen then it was showing the blank screen.
…his in CoreReaderFragment.

* Improved the UI to not show the webView options for deleted zim files.
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review April 29, 2024 14:24
… not properly loading after opening the note on the notes screen to ensure that this functionality should work properly.
Copy link
Collaborator

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kelson42 kelson42 merged commit 281ce6f into main Apr 30, 2024
9 of 10 checks passed
@kelson42 kelson42 deleted the Fix#3805 branch April 30, 2024 08:07
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.

Sometimes setting the org.kiwix.libzim.Archive.setNativeArchive crashes the application.
3 participants