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: Item.getSize sometimes throwing exception and application crashses. #4158

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

MohitMaliFtechiz
Copy link
Collaborator

Fixes #4157

Created an extension function to safely retrieve the item's size and handle any potential errors within this function. This method was used in three places, and since we are already handling cases where this method returns null, the existing functionality remains unaffected.

…getSize` method.

* Created an extension function to safely retrieve the item's size and handle any potential errors within this function. This method was used in three places, and since we are already handling cases where this method returns null, the existing functionality remains unaffected.
@MohitMaliFtechiz MohitMaliFtechiz changed the title Fixed: A crash reported by Play Store for the org.kiwix.libzim.Item.getSize method. Fixed: Item.getSize sometimes throwing exception and application crashses. Jan 3, 2025
@kelson42 kelson42 merged commit 061249a into main Jan 3, 2025
24 checks passed
@kelson42 kelson42 deleted the Fixes#4157 branch January 3, 2025 13:08
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 56.89%. Comparing base (7313a12) to head (98f29b7).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...org/kiwix/kiwixmobile/core/reader/ZimFileReader.kt 50.00% 3 Missing and 1 partial ⚠️
...iwix/kiwixmobile/core/reader/ZimReaderContainer.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4158      +/-   ##
============================================
- Coverage     56.96%   56.89%   -0.07%     
+ Complexity     1519     1516       -3     
============================================
  Files           313      313              
  Lines         13367    13373       +6     
  Branches       1655     1655              
============================================
- Hits           7614     7609       -5     
- Misses         4611     4618       +7     
- Partials       1142     1146       +4     

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

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.

Playstore reported a crash for org.kiwix.libzim.Item.getSize method.
3 participants