Skip to content

Conversation

@MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Nov 17, 2025

Fixes #4497

  • Moved the initialization of LibkiwixBookOnDisk to the IO thread instead of the main thread. Now, the manager will read the file on the IO thread before any method runs that depends on it. It will run only once.
  • Improved the localBooksFlow.
  • Refactored LibkiwixBookOnDisk similarly, since it also used the same initialization approach.
  • Since we now use tempLibrary for parsing the online library content, we no longer need the library and manager objects provided via Dagger. So we have removed them.
  • Fixed: The bookmark icon was not showing when adding a bookmark for a new book, deleting it, and then adding it again.

* Moved the initialization on `LibkiwixBookOnDisk` on IO thread instead of main thread. Now, the manager will read the file on IO thread before any method runs that depends on it. It will run only once.
* Improved the `localBooksFlow`.
* Refactored `LibkiwixBookOnDisk` similarly, since it also used the same initialization approach.
* Since we now use `tempLibrary` for parsing the online library content, we no longer need the library and manager objects provided via Dagger.
* Fixed: The bookmark icon was not showing when adding a bookmark for a new book, deleting it, and then adding it again.
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 78.94737% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.00%. Comparing base (51e8ea8) to head (82b4009).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...rg/kiwix/kiwixmobile/core/dao/LibkiwixBookmarks.kt 80.00% 5 Missing and 2 partials ⚠️
...g/kiwix/kiwixmobile/core/dao/LibkiwixBookOnDisk.kt 76.19% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #4499   +/-   ##
=========================================
  Coverage     59.00%   59.00%           
- Complexity     1490     1498    +8     
=========================================
  Files           320      319    -1     
  Lines         17084    17109   +25     
  Branches       2128     2133    +5     
=========================================
+ Hits          10081    10096   +15     
- Misses         5597     5613   +16     
+ Partials       1406     1400    -6     

☔ 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.

@kelson42 kelson42 merged commit 26153a3 into main Nov 17, 2025
57 of 59 checks passed
@kelson42 kelson42 deleted the Fixes#4497 branch November 17, 2025 21:12
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.

Input dispatching timed out error on Manager.readFile.

4 participants