8432 Commits

Author SHA1 Message Date
MohitMaliFtechiz
561af8f735 Added UI test cases for testing these both scenarios. 2025-01-31 12:49:59 +01:00
MohitMaliFtechiz
73ea170b03 Fixed: When a note is deleted, the corresponding file remained in storage.
* The note file is now deleted from storage when the user selects multiple notes and deletes them from the "Notes" screen.
* Improved note deletion in the "Note Dialog." Previously, when deleting a note from the `AddNoteDialog` on the Notes screen, the file was removed from storage, but its entry remained in the database, causing the note to still appear on the "Notes" screen after deletion. This issue has now been fixed.
2025-01-31 12:49:59 +01:00
Kelson
3da8c407c2
Merge pull request #4199 from kiwix/Fixes#4198
Fixed: Search was not working when closing a tab and immediately opening the search screen.
2025-01-31 12:49:18 +01:00
MohitMaliFtechiz
8be4029e0e Fixed: Search was not working when closing a tab and immediately opening the search screen.
* The issue occurred because, after closing a tab and quickly navigating to the search screen, the snackbar callback was still running in the background. When switching to the search screen, the WebView list was empty because we clear it when the fragment's view is destroyed. As a result, the book was closed, and the SearchScreen could not find the ZIM file for searching.
* To fix this, we now dismiss the snackbar callback when the fragment's view is destroyed.
2025-01-31 11:10:00 +01:00
Kelson
553fc44512
Merge pull request #4204 from kiwix/Fixes#4203
Bumped the `upload-artifact` action from version 3 to version 4.
2025-01-31 11:09:11 +01:00
MohitMaliFtechiz
1690a76275 Bumped the upload-artifact action from version 3 to version 4.
* The CI pipeline was failing due to the deprecated version of `upload-artifact` (v3).
* Upgrading to version 4 resolves the deprecation error and ensures compatibility with the latest features and improvements.
2025-01-31 14:51:22 +05:30
Kelson
734638356f
Merge pull request #4192 from kiwix/update_changelog_file_for_3.14.0
Updated the `CHANGELOG` file to show changes made in milestone `3.14.0`.
2025-01-28 11:01:44 +01:00
MohitMaliFtechiz
8687cb6a29 Updated the CHANGELOG file to show changes made in milestone 3.14.0. 2025-01-28 14:59:09 +05:30
Kelson
0000cdd7d5
Merge pull request #4191 from kiwix/update_kiwix_version_to_3.14.0
Upgraded the kiwix version to `3.14.0`.
2025-01-28 09:01:28 +01:00
MohitMaliFtechiz
6946dceeda Upgraded the kiwix version to 3.14.0. 2025-01-28 09:01:14 +01:00
Kelson
31f95fca67
Merge pull request #4190 from kiwix/Fixes#3956
Using java-libkiwix `2.2.4` to fix native crashes happens while getting the `getEntryByPath`, and `getData()` methods.
2025-01-28 09:00:41 +01:00
MohitMaliFtechiz
2746533375 Using java-libkiwix 2.2.4 to fix native crashes happens while getting the getEntryByPath, and getData() methods. 2025-01-28 11:41:21 +05:30
Kelson
773de4bfd4
Merge pull request #4187 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2025-01-27 19:55:56 +01:00
translatewiki.net
732b83ac6c Localisation updates from https://translatewiki.net. 2025-01-27 14:24:17 +01:00
Kelson
8bd23938bc
Merge pull request #3937 from CalebKL/task/anr-fix-zimfile-reader
Task/anr fix zimfile reader
2025-01-27 14:17:51 +01:00
MohitMaliFtechiz
053b6e0937 Improved the getting bookmarks for current book. 2025-01-27 12:17:06 +05:30
MohitMaliFtechiz
b1c065882d Made the convertToBookOnDisk method suspend, as it creates the ZimFileReader object to convert the files into Books.
* Refactored the `StorageObserverTest` to align with this new change.
2025-01-27 12:17:06 +05:30
MohitMaliFtechiz
2f5da0ea3e Reverted the changes of showing the progress while opening the notes in note screen since now we are not creating the ZimFileReader on note screen. 2025-01-27 12:16:08 +05:30
MohitMaliFtechiz
45c74af742 Fixed: All unit test cases. 2025-01-27 12:14:28 +05:30
MohitMaliFtechiz
0d18419f7a Fixed: Links not working in restored tabs after closing all tabs and restoring them.
* Improved the tab closing and restoring process. Previously, when the user closed all tabs, the `ZimFileReader` was set to null. If the user restored the tabs, a new `ZimFileReader` was created, which was a resource-intensive operation, especially for large ZIM files.
* Now, the `ZimFileReader` is not set to null while the "restore tab" snackbar is visible, allowing users to restore tabs without recreating the ZimFileReader.
* Once the snackbar is dismissed, the `ZimFileReader` is set to null to free up resources since it is no longer required.
2025-01-27 12:13:52 +05:30
MohitMaliFtechiz
c9895206ed Added loading functionality to the notes dialog. 2025-01-27 12:13:39 +05:30
MohitMaliFtechiz
a181198079 Refactore code to not set the ZimFileReader when restoring the tabs since the ZIM file is already set in the reader 2025-01-27 12:12:29 +05:30
MohitMaliFtechiz
dd5a459d32 Creating the reader in lifecycleScope 2025-01-27 12:12:10 +05:30
MohitMaliFtechiz
9d4db58ce4 Suspended setZimReaderSource and switched to IO when creating ZimFileReader 2025-01-27 12:10:39 +05:30
Kelson
948b8cce20
Merge pull request #4189 from kiwix/Fixes#4184
Fixed: Navigation drawer showing while reading a book in fullscreen mode.
2025-01-26 22:16:35 +01:00
MohitMaliFtechiz
22a3b4d9d2 Fixed: Navigation drawer showing while reading a book in fullscreen mode.
* Disabled the right drawer when the user is reading a book in fullscreen mode to ensure uninterrupted reading.
* Also disabled the drawer while a video is playing in fullscreen mode to avoid interruptions during video playback.
2025-01-26 21:07:51 +01:00
Kelson
99aae9441b
Merge pull request #4186 from kiwix/Fixes#4185
Fixed: If storage permission is permanently denied on Android 11 or below, the selected file via the file picker does not open.
2025-01-26 21:07:24 +01:00
MohitMaliFtechiz
65d00fe616 Fixed the scenario where, if the application does not have the MANAGE_EXTERNAL_STORAGE permission and the user tries to open a ZIM file from the file manager, the app now prompts for the required permission instead of showing an error. 2025-01-26 19:19:09 +01:00
MohitMaliFtechiz
daeec25ffd Fixed: If storage permission is permanently denied on Android 11 or below, the selected file via the file picker does not open.
* The storage permission dialog is now shown when the user clicks the "File Picker" button, prompting them to grant the permission first before selecting a ZIM file via the file picker.
* If storage permission is denied or not granted, and the user opens a ZIM file by clicking on it in the file manager, the app will first prompt for permission. Once the permission is granted, the ZIM file will open in the reader. If the permission is not granted, the operation is canceled, and the selected ZIM file will not open.
2025-01-26 19:19:09 +01:00
Kelson
952f039345
Merge pull request #4183 from kiwix/Fixes#4180
Removed the unnecessary creation of ZimFileReader when opening notes on the Notes screen.
2025-01-26 19:18:34 +01:00
MohitMaliFtechiz
93b6448362 Refactored the NoteFragmentTest according to this new change. 2025-01-26 17:10:56 +01:00
MohitMaliFtechiz
7acbbb54c0 Removed the testing log. 2025-01-26 17:10:56 +01:00
MohitMaliFtechiz
6387c5ceae Removed the unnecessary creation of ZimFileReader when opening notes on the Notes screen.
* Refactored `AddNoteDialog` to use database values for performing note-related operations (e.g., view, edit, delete notes) instead of setting and using `ZimFileReader`.
2025-01-26 17:10:56 +01:00
Kelson
86ddd87076
Merge pull request #4178 from jackq97/main
Updated detekt configuration to support compose:
2025-01-26 17:10:02 +01:00
Jaskq
c11f8561db Updated detekt configuration:
- Removed 'Preview' from `ignoreAnnotatedFunctions` in Complexity rule set.
'not supported in this version'
- Updated `constantPattern` to `[A-Z][_A-Z0-9]*` for TopLevelPropertyNaming rule.
- Added 'Preview' to `ignoreAnnotated` in UnusedPrivateMember rule set.
2025-01-22 15:20:33 +05:30
Jaskq
29fdbc1913 Updated detekt configuration:
*   Increased the `functionThreshold` for `LongParameterList` from 6 to 8.
*   Enabled `ignoreDefaultParameters` for `LongParameterList`.
*   Updated `functionPattern` to allow uppercase letters at the beginning.
* Add  `ignoreAnnotatedFunctions` to `['Preview']`
* Add `ignoreAnnotated` to `['Composable']`
* Updated `constantPattern` to accept uppercase letters followed by alphanumeric characters.
* Enabled `ignorePropertyDeclaration` for `MagicNumber`.
2025-01-22 15:20:33 +05:30
Kelson
62722191a7
Merge pull request #4162 from kiwix/Fixes#4161
Fixed: Application crashes when opening the random article.
2025-01-19 17:17:24 +01:00
MohitMaliFtechiz
85427c4551 Improved the behavior of enabling menu buttons.
* Previously, when a ZIM file was in the process of opening, the reopenBook method was used to hide the "Open Library" button if it was visible. However, this method also enabled the menu buttons. If an error occurred while loading the ZIM file, the controls remained enabled, which was not desirable. Now, the "Open Library" button is hidden, and the menu buttons are shown only after the ZIM file has successfully loaded. If an error occurs during loading, an error message is displayed (as it was previously), and the UI is updated accordingly.
2025-01-19 17:07:56 +01:00
MohitMaliFtechiz
c60ea98b73 Fixed the issue where opening a random article caused the application to crash.
* The issue occurred in the Play Store variant, specifically with the copy/move functionality for ZIM files. After copying or moving a ZIM file, the application attempts to open it in the reader. However, if the application tries to open a split ZIM file with only one chunk, it throws an error indicating that the file is not a valid ZIM file (which is expected, as not all ZIM chunks have been copied/moved). When this error occurs, the menu buttons remain enabled, allowing the user to interact with them. If the user then attempts to open a random article, the application enters an infinite loop and crashes. To resolve this, we now disable the menu controls whenever an error occurs while opening a ZIM file, preventing the user from using them in such scenarios.
2025-01-19 17:07:56 +01:00
MohitMaliFtechiz
1791911f13 Fixed: infinite loop and improve error handling for fetching random article.
* Fixed an issue where the app would enter an infinite loop when the zimFileReader was null, causing a crash.
* Improved the condition to check if zimFileReader is null and show a proper error message to the user without retrying.
* Added a retry mechanism to attempt fetching the random article twice in case of an internal error in libzim.
* After two failed attempts, an error message is displayed to the user if the random article is not found.
2025-01-19 17:07:56 +01:00
Kelson
ef1239fa4a
Merge pull request #4167 from kiwix/Fixes#4166
Fixed: Application crash while adding application shortcuts.
2025-01-19 17:07:05 +01:00
MohitMaliFtechiz
08e004a819 Fixed: Application crash while adding application shortcuts.
* Using the `ShortcutManagerCompat` class to add dynamic shortcuts instead of directly using the `ShortcutManager` class, as it provides better handling for adding shortcuts.
* The issue occurred because these shortcuts were defined in the manifest, which treated them as immutable and unable to be updated. We removed them from the manifest and added them as dynamic shortcuts. On some devices (e.g., Honor devices), it takes time to remove these shortcuts from the static shortcut list after the user updates the app, causing them to be treated as immutable and unable to be updated. This led to the crash. To fix this, we updated our shortcut IDs so that when the previous static shortcuts are removed by the OS, it will not affect the creation of the new dynamic shortcuts.
* For previously added dynamic shortcuts on other devices, we implemented a removeOutdatedIdShortcuts() method, which removes the old dynamic shortcuts.
2025-01-19 17:06:09 +01:00
Kelson
bcc6ac88ce
Merge pull request #4168 from kiwix/Fixes#4128
Changed the website, and Nightly APKs name.
2025-01-19 17:05:16 +01:00
MohitMaliFtechiz
12c0e17197 Changed the website, and Nightly APKs name.
* Before the name was `kiwix-3.13.0.apk` for the release APK(with app id org.kiwix.kiwixmobile app id) we were uploading on the website. But now, we are uploading the standalone APK on the website(with org.kiwix.kiwixmobile.standalone app id) it is a breaking change, and users are not aware of it. So we are changing the APK name so that users can understand this change.
* Renamed the nightly APK since there also we are uploading the standalone APK.
2025-01-19 16:20:53 +01:00
Kelson
1949d29973
Merge pull request #4170 from kiwix/Fixes#4045
Showing a warning dialog when copying/moving the ZIM chunks in PS version.
2025-01-19 16:20:29 +01:00
MohitMaliFtechiz
4fe022c6a2 Improved the message of Warning dialog to show user where they can verify the ZIM chunks are copied/moved properly. 2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
c69efb1523 Improved the showing of the warning dialog so that all the instructions are clear to the user. 2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
10734ec75f Improved the warning message we are showing to the user after copying/moving the ZIm chunks. 2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
4e16102bc4 Improved the copying/moving of ZIM chunks.
* Now all the ZIM chunks are copying/moving correctly.
* Improved the warning message to inform user what should they do after copying/moving all the ZIM chunks.
* Implement a feature to directly view the copied/moved ZIM chunks by clicking on the button in warning dialog.
2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
be81ca5405 Showing a warning dialog when copying/moving the ZIM chunks in PS version. 2025-01-19 16:19:49 +01:00