MohitMaliFtechiz e0849fa183 Fixed: Library language list is now retrieved dynamically from libkiwix.
* Previously, we used `Locale.getISOLanguages()` to display the language list. However, this did not include all the languages in which books are available. Now, we use the `OPDS` stream via libkiwix to fetch online books, and utilize a method in libkiwix that provides the list of available book languages. This dynamically retrieved list is now shown in the `LanguageFragment`, allowing users to select a language and download books accordingly.
* The `LanguageFragment` previously relied on `ObjectBox` for storing and managing selected languages. This has now been migrated to use `Room` database instead.
* A migration strategy has been added to move previously selected languages from ObjectBox to Room.
* Corresponding test cases for migration have been added, and existing tests have been refactored to reflect these changes.
* Since we now rely on `libkiwix` to retrieve the language list, the `ZimManageViewModelTest` initially failed due to native code dependencies (JNI) not loading in unit test environments. To address this, we refactored the code and introduced a `JNIModule` class in the app module (where `OnlineLibraryManager` resides). We now inject the `Library` object, allowing us to pass a mocked instance to `ZimManageViewModel` for proper unit testing.
2025-07-02 01:02:33 +05:30
..