8681 Commits

Author SHA1 Message Date
MohitMaliFtechiz
21debceb82 Fixed: CodeFactor issues.
* Fixed: The `DownloadTest`.
* Fixed: The `uiDevice.pressBack` was not working with compose UI so we have replaced it with `Espresso.pressBack`.
* Fixed: NoteFragmentTest.
2025-08-02 01:00:28 +05:30
MohitMaliFtechiz
8112632c80 Fixed: Pressing the back button no longer reopens the Search fragment when you’re on the Reader fragment and navigated there from Search (which was happening before).
* Fixed: Pressing the back button now correctly closes the left drawer when it’s open on the Local Library or Online fragments.
* Introduced: A common mechanism to support back press handling across all fragments and the activity, and added support for "Periodic back navigation".
2025-08-01 17:54:39 +05:30
MohitMaliFtechiz
51bd9e7908 Fixed: NavController adding multiple instances of the same fragment in backStack with causing issues when navigating.
* Refactored the `DarkModeViewPainterTest` with compose UI.
* Refactored the `CopyMoveFileHandlerTest` according to compose UI.
* Refactored the test cases to get the fragments in test cases according to compose based navigation.
* Refactored the `SearchFragmentTestForCustomApp` test case.
2025-08-01 00:57:03 +05:30
MohitMaliFtechiz
08880afa17 Fixed: Many UI test cases to work with the new Compose-based UI in MainActivity.
* Removed `kiwix_nav_graph` and `custom_nav_graph`, and refactored the remaining code that depended on them.
* Refactored `HotspotNotificationManager` to use the Compose-based navigation graph instead of the XML one.
2025-07-31 00:44:50 +05:30
MohitMaliFtechiz
23e1dcdbdc Refactored the UI test cases according to compose based navigation. 2025-07-30 15:10:11 +05:30
MohitMaliFtechiz
4d97eeebc8 Fixed: The system bar was not correctly showing the icons.
* Fixed: When scrolling, the BottomAppBar was appearing behind the navigation buttons.
* Fixed: The hint in the table of contents was not showing on first-time app install.
* Fixed: Pressing the back button was immediately exiting the app when the table of contents drawer was open.
* Created the `CustomNavGraph` for custom app navigation and refactored related code.
* Refactored the logic to dynamically disable the left drawer when a custom app is configured not to show it.
* Simplified the code for enabling/disabling the sidebar.
* Resolved all lint and Detekt errors.
2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
8afaa8be52 Fixed: Clicking on a table of content item wasn’t scrolling the WebView to the selected section because the Compose ScrollState caused recomposition back to the previous scroll position — now replaced with a custom approach to smoothly scroll to the target section. * Fixed: The whole screen was scrolling when scrolling the table of contents.
* Fixed: App was crashing and not opening the intro screen on fresh install.
* Fixed: Design and appearance of the table of contents in dark mode.
2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
f041ee9cf0 Added a Table of Contents drawer to the reader screen and refactored all related code. * Fixed: BottomAppBar was not showing when hiding the tab switcher (tabs view).
* Removed some unused code from the project.
* Fixed: Some lint, and detekt issues in kiwix app.
2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
078ecb48cf Fixed: BottomAppBar was not scrolling when scrolling the WebView content on reader screen. * Fixed: Opening searched items was not working.
* Fixed: Flickering of the toolbar and BottomAppBar on the reader screen when scrolling the WebView slowly.
* Removed some unused code.
2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
16c5cc78ee Fixed: WebView scrolling is lagging with compose UI. * Fixed: the bottomAppBar is not showing when closing the tabs. 2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
877c4a7166 Introduced route-based navigation to pass arguments to fragments. * Removed some unused files. * Fixed: all library controls for navigation (e.g., sharing files, navigating to downloads, etc.).
* Fixed: Open library button not working.
* Fixed: opening ZIM file from storage (using the plus button) had too much bottom margin after migrating MainActivity to Compose.
* Added support for automatically hiding and showing the BottomAppBar while scrolling, using the Compose approach.
* Many other improvements in UI and logics.
* Show or hide the BottomAppBar when full screen mode is enabled/disabled or when tabs are visible.
* Disable the left drawer when opening full screen mode, tabs, etc.
2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
edae60fa52 Added support to reflect locale changes: when the application language changes, all UI now updates automatically to the selected language in a Compose-friendly way. Introduced a Compose-based approach to enable or disable the left drawer, simplifying drawer state management. 2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
a3d6ea49f9 Changed navigation to a Compose-based architecture using named routes instead of fragment IDs, and refactored all related code for both Kiwix and custom apps. 2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
86d9b1266f Refactored left drawer to support Kiwix and custom apps dynamically; improved right drawer UI. 2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
4e56c2c781 Created the KiwixNavGraph for Compose-based navigation. 2025-07-30 13:45:35 +05:30
MohitMaliFtechiz
095317e102 Migrated KiwixMainActivity and CustomMainActivity to Jetpack Compose. 2025-07-30 13:45:35 +05:30
Kelson
9853e0abd7
Merge pull request #4342 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2025-07-28 19:06:24 +00:00
translatewiki.net
ba3e0648cb
Localisation updates from https://translatewiki.net. 2025-07-28 14:06:58 +02:00
Kelson
453ddb4adf
Merge pull request #4340 from kiwix/Fixes#2689
Fixed: Library language list is now retrieved dynamically from `libkiwix`.
2025-07-11 22:38:56 +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
56cfa25d9f Fixed: remaining lint issues. 2025-07-07 16:13:14 +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
f3f3f224c0 Fixed: Emission with data+failure moves state from InProgress to Failed was sometimes fails on CI. 2025-07-02 17:21:50 +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
Kelson
85f11a71cc
Merge pull request #4335 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2025-07-01 10:13:16 +02:00
translatewiki.net
eb125b3342 Localisation updates from https://translatewiki.net. 2025-07-01 10:13:06 +02:00
Kelson
11a2f90b6d
Merge pull request #4337 from jackq97/#4332_migrate_donation_layout_into_compose
#4332 migrate donation layout into compose
2025-06-29 11:18:21 +02:00
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
bea28a16a3 Fixed: The donation layout was not respecting the dark theme.
* Fixed: The alignment of donation layout.
* Improved the `DonationLayout` code for better readability and maintainability.
2025-06-28 01:08:25 +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
Kelson
17936cd0b0
Merge pull request #4336 from kiwix/FIxes#4248
Migrated the `Reader` screen to jetpack compose.
2025-06-26 22:09:02 +02:00
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