8748 Commits

Author SHA1 Message Date
MohitMaliFtechiz
107c96e5ff Fixed: LocalLibraryTest which was failing on CI. 2025-08-29 17:14:48 +02:00
MohitMaliFtechiz
101404068e Improved the including of modules in variant. 2025-08-29 17:14:48 +02:00
MohitMaliFtechiz
7e71dc44df Fixed: AAPT error in nightly, and standalone APK.
* Improved the including of modules in variant.
2025-08-29 17:14:48 +02:00
MohitMaliFtechiz
1d175b9437 Refactor migration tests by including MigrationModule to ensure migration runs during tests. 2025-08-29 17:14:48 +02:00
MohitMaliFtechiz
c3559bf641 Fixed: After migrating notes and history, they were not opening in the reader screen when accessed from the bookmarks or notes screens. 2025-08-29 17:14:48 +02:00
MohitMaliFtechiz
71b7083932 Fixed: Dagger was unable to inject sharedPreferenceUtil, kiwixDatabase, etc from core module to migration module.
* Fixed: Circular dependency in app and custom module.
2025-08-29 17:14:48 +02:00
MohitMaliFtechiz
157d572396 Fixed: All compilation errors in dagger.
* Properly included the migration module based on the build variant via dagger.
2025-08-29 17:14:48 +02:00
MohitMaliFtechiz
1d9633c6a4 Removed all ObjectBox code from every variant except the Play Store version. 2025-08-29 17:14:48 +02:00
Kelson
86fa171b50
Merge pull request #4401 from kiwix/Fixes#2574
Added pure white theme for light theme.
2025-08-29 17:09:22 +02:00
MohitMaliFtechiz
f720b6f675 Improved the design of the KiwixAppBar in the pure white theme. Previously, it looked too plain and not like a proper toolbar, so we added a shadow to enhance its appearance and improve the overall design of the application. 2025-08-29 17:01:02 +02:00
MohitMaliFtechiz
aae67533e3 Fixed: testZimFileRendering test due to URL mismatch.
* Improved in full screen mode navigationBar was showing(3 button navigationBar in bottom) on Android 9.
2025-08-29 17:01:02 +02:00
MohitMaliFtechiz
badd101177 Added pure white theme for light theme.
* Refactored the all UI to support pure white theme.
* Enhanced the `EdgeToEdge` mode for pure white theme.
2025-08-29 17:01:02 +02:00
Kelson
c25e98b043
Merge pull request #4403 from kiwix/Fixes#4402
Fixed: `Wikimedar` application crash caused by Input Dispatching Timed Out.
2025-08-29 16:59:48 +02:00
MohitMaliFtechiz
683c35d5ac Fixed: Wikimedar application crash caused by Input Dispatching Timed Out.
* Moved the file-scanning logic to the IO thread, allowing smooth directory scanning or ZIM file preparation from the asset directory while keeping the main thread free.
* Refactored `CustomFileValidatorTest` to align with this change.
* Corrected the ZIM URL in `testZimFileRendering` test.
* Improved the `manageExternalLaunchAndRestoringViewState` for thread safety.
2025-08-29 15:53:00 +05:30
Kelson
b827cfe542
Merge pull request #4396 from kiwix/remove_objectbox_code_from_project
Removed ObjectBox code from the project (except migration-related code).
2025-08-20 16:08:00 +02:00
MohitMaliFtechiz
cfbc880756 Removed the unused code from detekt_baseline. 2025-08-20 16:06:23 +02:00
MohitMaliFtechiz
6ca3e21171 Removed unused ObjectBox code from the project.
* Removed related test cases and refactored some unit tests to use Room and libkiwix-based classes for test operations.
* Refactored `DownloadRoomEntity` to use Room’s converters instead of ObjectBox.
* Did not remove the `ObjectBox` entity classes and dependencies, since both are still required for migration.
2025-08-20 16:06:23 +02:00
Kelson
3f1e3d7b71
Merge pull request #4395 from kiwix/Fixes#4394
Fixed: Online library sometimes automatically loaded more items without user input.
2025-08-20 16:05:58 +02:00
MohitMaliFtechiz
f990e1cffb Fixed: Online library sometimes automatically loaded more items without user input.
* Removed the code that auto-scrolled the list to show the progress bar. Now, users will see the progress bar only when they scroll down to load more items.
* Improved `isLoadingMoreItem` handling to avoid duplicate `loadMore` calls after appending items
2025-08-20 16:05:35 +02:00
Kelson
8462128b70
Merge pull request #4393 from kiwix/Fixes#4392
Fixed: Tabs not restoring in multiple navigation scenarios.
2025-08-20 16:05:13 +02:00
MohitMaliFtechiz
5b68238e96 Added UI test cases for these scenarios to avoid future bugs like these. 2025-08-19 18:42:07 +05:30
MohitMaliFtechiz
2e36a7f788 Fixed: Tabs not restoring in multiple navigation scenarios.
* Fixed: When opening a new ZIM file from the local library and pressing the back button repeatedly, the previously loaded empty ZIM file reappeared in the reader.
* Fixed: Cached book for bookmarks sometimes returned "null" because it wasn’t properly cleared when navigating to other screens.
* Fixed: Tabs were not restoring when navigating to another screen via the bottomAppBar.
* Refactored the "FIND_IN_PAGE" flow — since we can now directly set the result on the previous back stack entry, relaunching the reader screen is no longer required.
* Fixed: Tabs not restoring when returning from left drawer screens.
2025-08-19 17:14:57 +05:30
Kelson
ad3f60133e
Merge pull request #4391 from kiwix/Fixes#4390
Fixed: Opening bookmarks, notes, and history in the reader screen does not work.
2025-08-19 06:15:33 +02:00
MohitMaliFtechiz
48ec6a81c5 Fixed: testBookMarkPageOpenInReader which was failing on API level 25, and 30. 2025-08-19 06:15:10 +02:00
MohitMaliFtechiz
d2ce4a71a1 Added UI test cases for bookmarks and notes to verify that saved items open the exact page in the reader. 2025-08-19 06:15:10 +02:00
MohitMaliFtechiz
629a7f18dc Fixed: Opening bookmarks, notes, and history in the reader screen does not work.
* The issue occurred because the reader screen route was not being created properly, as both modules had different destination classes. We made the openPage method abstract so that each module can provide its own destination with arguments to correctly open pages.
* Improved WebView creation in Compose.
2025-08-19 06:15:10 +02:00
Kelson
6bb8512391
Merge pull request #4388 from kiwix/Fixes#4387
Fixed: When changing the app's language, a blank screen appeared instead of the settings screen.
2025-08-19 06:14:53 +02:00
MohitMaliFtechiz
8938839e90 Fixed: updateOnlineLibraryFilters updates onlineLibraryRequest which sometimes fails on CI. 2025-08-15 21:54:29 +02:00
MohitMaliFtechiz
460c93a4ad Fixed: observeLanguages uses network when no cache and online which sometimes fails on CI. 2025-08-15 21:54:29 +02:00
MohitMaliFtechiz
9ef9f1b0fe Fixed: testPauseAndResumeInOtherLanguage was failing due to our recent change — we now wait for the frame to settle in production code, but Compose is unaware of this wait and immediately checks for the new view. This caused the failure where localLibrary was not found, as Compose was still waiting for synchronized execution. 2025-08-15 21:54:29 +02:00
MohitMaliFtechiz
456e348078 Fixed: When changing the app's language, a blank screen appeared instead of the settings screen.
* The issue occurred because we reopened the settings screen immediately after removing it from the back stack, causing Compose to not settle the previous frame and display a blank screen.
* Resolved by allowing the popBackStack frame to settle before reopening the settings screen.
* Removed some unused code from the project.
2025-08-15 21:54:29 +02:00
Kelson
fe7ded693a
Merge pull request #4386 from kiwix/Fixes#4385
Fixed: The search placeholder was cut off in the `Romansh` language.
2025-08-15 21:53:48 +02:00
MohitMaliFtechiz
4bc4d0a981 Fixed: testUserCanSeeNotesForDeletedFiles which sometimes fails on CI due to androidx.test.espresso.base.RootViewPicker$RootViewWithoutFocusException. 2025-08-15 15:02:23 +05:30
MohitMaliFtechiz
54a66d1084 Fixed: The search placeholder was cut off in the Romansh language.
* Updated the placeholder text to display on a single line and show an ellipsis (...) at the end if the text is too long.
2025-08-14 13:14:08 +02:00
Kelson
0e39ce6f9d
Merge pull request #4384 from kiwix/Fixes#4383
Fixed: Pressing the back button did not close the application when there were no fragments in the back stack.
2025-08-14 12:29:23 +02:00
MohitMaliFtechiz
10357e78f4 Fixed: Pressing the back button did not close the application when there were no fragments in the back stack.
* The `BackHandler` of top-level destination fragments was always active, preventing the `MainActivity` handler from being called because the top-level fragment's back handler consumed the back event. As a result, when the back stack was empty, pressing the back button did not exit the application.
* We now dynamically enable the `BackHandler` only while a fragment can handle the back event. Once the fragment has handled it, the handler is disabled so that `MainActivity` can process the back event.
2025-08-14 12:28:56 +02:00
Kelson
17b148fc4f
Merge pull request #4382 from kiwix/Fixes#4381
Fixed: Online library was not retrieving after clicking “Allow downloading via mobile network” in the confirmation dialog.
2025-08-14 12:28:31 +02:00
MohitMaliFtechiz
2bc89b9ad2 Improved the testBookmarkRemainsSavedOrNot which sometimes fails on Android 15, and 16. 2025-08-14 12:45:34 +05:30
MohitMaliFtechiz
3b4a5d29fa Fixed: Online library was not retrieving after clicking “Allow downloading via mobile network” in the confirmation dialog.
* Cause: The request object emitted after user confirmation was identical to the previous one, so the flow collector skipped it and the fetch was never triggered.
* Solution: Added a `System.nanoTime()` field to the request to ensure a unique emission while still preserving existing values.
* Refactored the `updateOnlineLibraryFilters updates onlineLibraryRequest` according to this new change.
2025-08-13 17:32:56 +02:00
Kelson
26cc6faec8
Merge pull request #4380 from kiwix/Fixes#4379
Fixed: When opening the search from widget or from outside the application then search is broken with large ZIM files.
2025-08-13 17:32:43 +02:00
MohitMaliFtechiz
cf31f53484 Fixed: When opening the "Online Library" screen from an app shortcut, clicking on the reader screen did not work, causing the GetContentShortcutTest to fail. 2025-08-13 16:55:34 +05:30
MohitMaliFtechiz
67a05315a7 Fixed: When opening the search from widget or from outside the application then search is broken with large ZIM files.
* Fixed: When launching the app fresh (cold start), the search screen could appear before the ZIM file was ready (because ZIM file loading in the reader happens on the IO thread), resulting in no search results. Now, incoming actions are delayed until the ZIM file finishes loading so that search works correctly.
* Fixed: Multiple fragment instances were created when repeatedly opening different fragments via bottomAppBar buttons, causing the back button to bring them to the foreground one by one instead of expected behavior.
2025-08-13 16:54:17 +05:30
Kelson
bd7228354f
Merge pull request #4373 from kiwix/Fixes#4368
Fixed: File size unit / calculation differs from Kiwix-Server.
2025-08-13 11:38:03 +02:00
MohitMaliFtechiz
e9d3737955 Fixed: File size unit / calculation differs from Kiwix-Server.
* Changed the size calculation from GiB (binary format) to GB (decimal format).
* Removed the unused `OnSwipeTouchListener` class.
2025-08-13 11:37:27 +02:00
Kelson
b3090a175d
Merge pull request #4378 from kiwix/Fixes#4377
Fixed: `FIND_IN_PAGE` not working after switching to another ZIM file.
2025-08-13 11:33:55 +02:00
MohitMaliFtechiz
dab9754546 Fixed: FIND_IN_PAGE not working after switching to another ZIM file.
* NavBackStackEntry arguments are immutable, so switching to `FIND_IN_PAGE` used arguments from the previous ReaderFragment backstack entry.
* Fixed by popping the old ReaderFragment from the backstack and launching a fresh instance with the new search arguments.
* Fixed: Multiple `SearchScreen` instances showing when repeatedly opening the search screen.
* Fixed: Reader screen showing an older ZIM file after opening a new one and pressing back.
* Refactored `SearchInPreviousScreenTest` according to the new changes.
* Minor improvement in navigation.
2025-08-13 11:33:44 +02:00
Kelson
82a7fc3713
Merge pull request #4376 from kiwix/Fixes#4375
Fixed: Background downloading of ZIM files not working.
2025-08-13 11:33:11 +02:00
MohitMaliFtechiz
f99e37a017 Improved the background download test. 2025-08-11 22:51:18 +05:30
MohitMaliFtechiz
16ea02274b Added the downloadZIMFileInBackground for testing the download when application is in background.
* Removed some unused code from project.
2025-08-11 22:24:26 +05:30
MohitMaliFtechiz
7a828617b0 Fixed: Background downloading of ZIM files not working.
* There is a limitation with foreground services — we cannot update a foreground service notification from the background (when the application is not running). Starting with Android 16, foreground services also validate the notification ID to ensure it exists before running; this was not enforced in earlier versions, where it worked fine. When multiple downloads are running in the background and one completes, setting a new notification to the foreground service causes it to stop, which in turn stops all background downloads. Additionally, our foreground service was tied to a specific download ID, so when that download completed, was cancelled, or paused, the service also stopped.
* To fix this, we now show a persistent notification that remains active until all downloads are completed or cancelled. This ensures the foreground service stays active in the background and the network is not suspended while downloads are in progress.
2025-08-11 16:29:46 +05:30