3356 Commits

Author SHA1 Message Date
translatewiki.net
ba3e0648cb
Localisation updates from https://translatewiki.net. 2025-07-28 14:06:58 +02:00
MohitMaliFtechiz
a36447f968 Fixed: LanguageViewModelTest which was failing on CI but passing locally. 2025-07-11 19:15:15 +05:30
MohitMaliFtechiz
badddc8aab Refactored the remaining test cases of ZimManageViewModel to follow the new approach. Additionally, added new unit test cases to cover new functionalities such as pagination, fetching new content when changing language, searching, etc.
* Improved some unit test cases that sometimes failed on CI due to coroutine IO threading issues.
2025-07-11 04:23:08 +05:30
MohitMaliFtechiz
136052e0bb Refactored the ZimManageViewModelTest according to according to OPDS catalog fetching. 2025-07-10 00:48:31 +05:30
MohitMaliFtechiz
95dddd470a Refactored the LanguageFragmentTest UI test to properly verify that the language filter is applied correctly and that content is fetched for the selected language.
* Fixed: some lint warnings.
2025-07-09 23:40:29 +05:30
MohitMaliFtechiz
60aeaaa67d Refactored the LanguageViewModelTest unit test and added new test cases for testing the new scenarios.
* Removed the `DefaultLanguageProvider` since now it is unused according to this new approach.
* Refactored the `SaveLanguagesAndFinishTest` unit test according to this new approach.
2025-07-09 22:45:52 +05:30
MohitMaliFtechiz
d4cbaea0bb Improved the DownloadTest according to this new change. 2025-07-09 15:13:40 +05:30
MohitMaliFtechiz
2faf1b68ac Fixed: compilation error in UI test cases.
* Fixed: language filter was not applying after selecting the "All language".
2025-07-09 14:51:27 +05:30
MohitMaliFtechiz
c8b17b08e3 Fixed: Library items was not showing when applying the language filter.
* Improved the UI to show the selected language on `OnlineLibrary` screen to inform users which language they have selected for fetching the ZIM files.
* Refactored the code to apply the search filter same like kiwix server.
2025-07-08 00:47:46 +05:30
MohitMaliFtechiz
28523ca277 Improved the caching mechanism for the language list.
* Improved the language list UI according to new approach.
* Fixed: codeFactor and lint issues.
2025-07-07 16:10:53 +05:30
MohitMaliFtechiz
9d3db72aaa Refactored the UI of LanguageFragment to select single language so that language filter can apply on the online library same like kiwix server. 2025-07-05 18:24:54 +05:30
MohitMaliFtechiz
014ef2bcef Refactored the LanguageViewModel to fetch the language list from an online source. 2025-07-05 00:01:10 +05:30
MohitMaliFtechiz
8b02f96c1c Refactored the ZimManageViewModel to fetch the library reactively from the network and laid the groundwork for applying filters in network requests. 2025-07-04 00:47:20 +05:30
MohitMaliFtechiz
d9a10b30a6 Refactored the code to fetch the online library from OPDS same like Kiwix server, it first fetches the 50 items from the OPDS catelog, and load more when needed. 2025-07-03 00:40:57 +05:30
MohitMaliFtechiz
2e9417c3ac Fixed: ZimManageViewModelTest was failing on CI. 2025-07-02 14:11:03 +05:30
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
MohitMaliFtechiz
1e9e634fca Added DonationDialogTest UI test cases to thoroughly verify the functionality using Compose UI.
* Minor improvements to dark mode styling for the donation layout buttons.
2025-06-28 20:11:13 +05:30
MohitMaliFtechiz
fb59174d6e Migrated the DonationLayout to Jetpack Compose.
* Implemented the `DonationLayout` using Compose UI.
* Refactored the `ReaderScreen` to integrate the new Compose-based layout.
* Added a maximum width constraint to the donation layout to prevent it from appearing too wide in landscape mode or on tablets.
* Removed unused code from the project.
2025-06-28 00:30:07 +05:30
MohitMaliFtechiz
eca3c355b2 Fixed: SearchFragmentTestForCustomApp was failing.
* Fixed: The appearance of TTS control buttons.
2025-06-26 18:09:26 +05:30
MohitMaliFtechiz
a6eb00f6b9 Refactored the remaining UI test cases. 2025-06-26 17:21:59 +05:30
MohitMaliFtechiz
a51615e249 Fixed: An extra space appeared at the bottom when navigating to a ZIM page with greater height and then returning to the previous page.
* Removed unnecessary code and files from the project.
* Refactored several UI test cases to align with the Compose UI.
* Fixed: Some lint issues.
2025-06-26 00:52:06 +05:30
MohitMaliFtechiz
db22e245b7 Fixed: WebView was not occupying full height when the BottomAppBar was hidden.
* Moved the scrolling logic of the WebView into the Compose UI, as custom scroll handling in the WebView was causing issues.
* Removed ToolbarScrollingKiwixWebView since it's no longer needed—scrolling is now managed entirely within Compose.
* Added animations for opening and closing the tab switcher view.
2025-06-25 01:50:22 +05:30
MohitMaliFtechiz
3ebb37d5cc Refactored the TOC button functionality to handle cases where custom apps are configured to disable it.
* Fixed: Missing bottom margin in custom apps.
* Fixed: Reader's bottom app bar not appearing after closing or selecting a tab.
* Fixed: Menu not showing in the toolbar when the application is freshly launched in custom apps.
* Refactored the scroll behavior of the toolbar and bottom app bar to sync with WebView scrolling in the Compose UI.
2025-06-24 01:23:18 +05:30
MohitMaliFtechiz
2608694442 Fixed: Clicking on "Plus button" in tab switcher crashes the application.
* Refactored the "FullScreen Video" functionality according to compose UI.
* Refactored the functionality where custom app is configured to show search placeholder in toolbar, and created the search placeholder in compose.
* Refactored the functionality where custom app is configured to show app icon in place of humbuger icon.
2025-06-21 00:46:15 +05:30
MohitMaliFtechiz
234e9169f6 Fixed: Tabs were being automatically restored after closing them, navigating away from the reader screen, and then returning.
* Removed unused code from the reader screen.
* Refactored fullscreen mode functionality to align with Compose UI.
* Improved the `CloseAllTabs` button styling to match the app theme.
* Refactored the "Back to Top" button functionality using Compose, and enhanced its UI.
* Fixed: `Long-press` on bottom app bar buttons was not working due to `IconButton` consuming the touch event.
* Removed the unused `AnimationUtils` file.
* Fixed: Navigation history (forward and backward) was not being displayed.
2025-06-19 23:58:38 +05:30
MohitMaliFtechiz
b694ae3170 Refactored all tab-related functionalities.
* Improved the tabs UI to align with our XML-based layout. Added a border to the selected tab for better visual feedback, making it easier for users to identify the active tab.
* Added animation to smoothly scroll to the selected tab when the tab switcher is opened.
* Fixed a crash scenario when "Close All Tabs" was triggered.
* Fixed a crash that occurred when launching the app for the first time.
* Fixed an issue where the tab menu item was still visible even after all tabs were closed.
2025-06-19 02:55:45 +05:30
MohitMaliFtechiz
f654a64b7e Refactored all functionalities of the Reader's menu: showing or hiding menu items based on business logic, updating the tab item count, and more.
* Improved the KiwixAppBar to support custom views in menu items — enabling custom UI like the tab switcher.
* Fixed: TTS controls were not displaying correctly on the UI.
* Refactored the TTS functionality to align with the Compose UI architecture.
* Fixed: Some lint issues and improve the code quality.
2025-06-18 02:23:32 +05:30
MohitMaliFtechiz
5c879484a6 Fixed: WebView was not loading content properly in Compose.
* Refactored KiwixAppBar to support a string title instead of a string resource ID, allowing dynamic titles like ZIM file names.
* Fixed: ZIM file title was not appearing correctly in the toolbar.
* Refactored all snackbar-related functionalities on the reader screen.
* Updated KiwixAppBar to support an overflow menu.
* Introduced ReaderMenuState to manage menu item state dynamically for improved maintainability.
2025-06-17 20:59:10 +05:30
MohitMaliFtechiz
6ea560407d Created the TabsView to display tabs on the Reader screen.
* Improved the UI of the `Reader screen` to display the tabs view properly.
* Refactored functionalities in `CoreReaderFragment`, including bottom toolbar interactions, runtime UI updates, and handling of the "No Book Open" button, etc.
2025-06-17 20:59:10 +05:30
MohitMaliFtechiz
39baa985fb Migrated the Reader screen to jetpack compose.
* Created the `ReaderScreen` for compose UI.
* Created the `ReaderScreenState` to manage the state of UI.
2025-06-17 20:59:10 +05:30
MohitMaliFtechiz
e24d214553 Fixed: ZimManageViewModelTest which was failing on CI. 2025-06-12 14:53:37 +05:30
MohitMaliFtechiz
c2d35e17d4 Added migration test cases for migrating the objectBox data to libkiwix.
* Fixed: `ImportBookmarkTest` which was failing on CI.
* Refactored UI and unit test cases according to the new codebase.
* Fixed: Selecting a ZIM file would select all ZIM files displayed on the Local Library screen.
* Fixed: `network result & language db results activate a combined network + db result`, `library marks files over 4GB as can't download if file system state says to` and `books found on filesystem are filtered by books already in db`, which sometimes fails on the CI.
2025-06-12 00:18:50 +05:30
MohitMaliFtechiz
42da475867 Refactored all functionalities to use LibkiwixBookOnDisk instead of NewBookDao.
* Fixed: Saved books in the library were not appearing on the Local Library screen.
* Fixed: Opening a ZIM file via the download notification was not working.
* Fixed: Selecting a ZIM file would select all ZIM files displayed on the Local Library screen.
* Improved: Migration logic now properly migrates books that were stored in the file system before introducing `ZimReaderSource`.
2025-06-11 00:53:35 +05:30
MohitMaliFtechiz
8370f72d35 Migrated on-disk BookStores/ZimStores from ObjectBox to libkiwix. 2025-06-10 00:28:45 +05:30
translatewiki.net
f2942d71b9 Localisation updates from https://translatewiki.net. 2025-06-07 20:35:34 +02:00
MohitMaliFtechiz
40edd03396 Fixed: Bookmarks were not showing for newly added books from the OPDS stream.
* Removed books from `library.xml` if they no longer have any associated bookmarks, as keeping them is unnecessary and wastes resources and memory, while also increasing the time needed to load the library from storage.
* Fixed: The downloading online library progress was showing incorrect.
* Refactored the all unit test cases according to the new changes.
2025-06-07 00:02:09 +05:30
MohitMaliFtechiz
ebbe1b9889 Fixed: Downloading was not working.
* Fixed: `Online Books` were showing incorrect book sizes. The OPDS stream now provides sizes in bytes instead of kilobytes, so the code has been updated accordingly.
* Added the `io.coil-kt.coil3:coil-compose` library to load favicons for online books, as OPDS now returns favicon URLs instead of Base64-encoded strings.
* Since favicons are no longer provided in Base64 format when downloading ZIM files, we now extract the favicon from the Archive using libkiwix after the download completes. This allows us to display it locally on various screens such as the library, Wi-Fi hotspot, notes, history, and more.
* Cached the `LibkiwixBook` instance to avoid recreating it multiple times when adding or removing bookmarks.
2025-06-05 23:49:02 +05:30
MohitMaliFtechiz
7a10528d19 Added the com.squareup.retrofit2:converter-scalars converter to Retrofit to parse OPDS network responses.
* Created `LibkiwixBook` to wrap the `Book` class from `libkiwix`, allowing us to set custom values from the database and manage books received from the `OPDS` stream. This wrapper is necessary because the original Book class does not provide setters. We'll use `LibkiwixBook` throughout the codebase.
* Refactored the codebase to replace `LibraryNetworkEntity.Book` with `LibkiwixBook`.
2025-06-04 22:16:09 +05:30
MohitMaliFtechiz
20722fe15b Introduced support of OPDS catalog. * Created the OnlineLibraryManager class to manage the OPDS stream with libkiwix. * Refactored the ZimManageViewModel, and KiwixService code according to OPDS catalog. 2025-06-03 18:42:51 +05:30
MohitMaliFtechiz
5ab5529acf Refactored all UI test cases to align with the new settings Compose UI. 2025-06-02 16:50:08 +05:30
MohitMaliFtechiz
ba476058fe Fixed: The Text Zoom slider did not correctly display the previously set position after restarting the application.
* Removed the BaseDelegateAdapter and its subclasses, as RecyclerView is no longer used in the codebase.
* Fixed: CustomApps was crashing when opening the settings screen.
* Fixed: StorageList was not appearing on the settings screen.
* Fixed: Dark Mode and Language dialogs to match the theme design.
* Created KiwixBasicDialogFrame, a reusable Compose UI component to standardize the design of alert dialogs.
* Removed unused code from the project.
2025-05-30 17:55:02 +05:30
MohitMaliFtechiz
164e38b113 Refactored the remaining functionality to use Jetpack Compose UI.
* Improved the design of the `Settings` screen to match the previous XML layout.
* Updated the ViewModel to handle user interactions following the MVVM pattern.
* Introduced `SettingScreenState` to manage the state of the settings screen.
* Removed `KiwixPrefsFragment`, `CustomPrefsFragment`, and `CorePrefsFragment` as they are no longer needed.
* Cleaned up unused code from the project.
2025-05-29 19:04:40 +05:30
MohitMaliFtechiz
5aac7e4815 Migrated the Settings screen to Jetpack Compose.
* Created the `SettingsScreen` using Jetpack Compose UI components.
* Implemented `SettingsViewModel` to manage and update preferences reactively, supporting the Compose architecture.
* Refactored existing functionality to align with the Compose-based UI.
2025-05-29 19:04:40 +05:30
MohitMaliFtechiz
6cae44821e Refactored RxJava to coroutines in ConnectivityBroadcastReceiver.
* Simplified the `combineToLanguageList` method and removed warnings.
* Refactored `ZimManageViewModelTest` to align with the changes.
* Removed unused `RxJava` code from the project.
* Removed all `RxJava` dependencies from the project.
* Updated the `README` file to reflect that `RxJava` is no longer used.
* Updated `credit.html` accordingly, similar to the `README`.
2025-05-27 17:48:28 +05:30
MohitMaliFtechiz
31cc84664c Improved the KiwixSearchView to handle the keyboard onDone button press. Now, when the user presses the Done button on the keyboard, it triggers the search and opens the first matching item, if available.
* Fixed: The `FIND_IN_PAGE` button was appearing when the search was opened from `FromTabView`.
* Fixed: The `FIND_IN_PAGE` button was not displaying properly (only half was visible).
* Improved: The `NavigationIcon` to better support test cases.
* Fixed: `VoiceSearch` was not working when launched from the `SearchWidget`.
* Refactored: `SearchFragmentTest` and `SearchFragmentTestForCustomApp` to align with the Compose UI.
* Removed: Additional unused code from the project.
2025-05-26 22:31:25 +05:30
MohitMaliFtechiz
a3b1b95181 Migrated SearchFragment to jetpack compose.
* Improved the `KiwixAppBar` to show the textButton in actionMenu. Since we need to show the `FIND_IN_PAGE` textView button in actionMenu.
* Created the `SearchScreen` and migrated the all UI to compose from XML.
* Refactored the functionalities of `SearchFragment` according to compose UI.
* Removed the unused code from project.
2025-05-26 14:07:33 +05:30
MohitMaliFtechiz
e7b1c94f3b Improved the display of the "Downloading online library progress" message — previously, it was sometimes not shown, and only the progress bar at the top was visible.
* Updated the logic to hide the top progress bar when updating the library items while applying filters.
* Refactored all unit test cases to properly support coroutines.
2025-05-22 23:55:13 +05:30
MohitMaliFtechiz
989b22f563 Fixed: Network violation issue while downloading the online library.
* Fixed: Download progress of the online library was not displayed when navigating away from the fragment and returning while the download was still in progress.
* Fixed: Both the SwipeRefreshIndicator and the progress bar were shown simultaneously during the initial download of the online library.
* Improved: The logic for hiding the SwipeRefreshIndicator. It now automatically hides when the progress bar (with visible progress) is displayed.
* Improved: Handling of library re-downloads upon network state changes.
* Fixed: The progressBar was showing when we searching for books.
* Fixed: Compilation errors in unit test cases.
2025-05-21 18:44:25 +05:30
MohitMaliFtechiz
f5d55d2c8a Fixed compilation and lint issues.
* Fixed: Selected language filter was not being applied to the online library.
* Fixed: Unnecessary UI recomposition.
* Improved code readability and resolved related lint errors.
* Fixed: "Allow downloading content via mobile network?" dialog was not displaying correctly.
* Fixed: SwipeRefreshing was not working when the "Swipe Down for Library" message was shown.
* Improved: Previously, the online library would re-download every time the fragment was launched or brought to the foreground (e.g., when navigating back from another screen). This behavior has been changed to use coroutines. The library now downloads only once initially, and subsequent downloads only occur when the user manually refreshes the library. This helps reduce unnecessary data usage and network calls.
2025-05-20 17:05:09 +05:30
MohitMaliFtechiz
701fffb758 Refactored RxJava to coroutines in OnlineLibrary 2025-05-20 08:46:39 +05:30