8497 Commits

Author SHA1 Message Date
MohitMaliFtechiz
79e0ec72c1 Fixed: Toolbar title was not appearing when closing the SearchView. 2025-04-14 18:39:11 +05:30
MohitMaliFtechiz
ad9d43b455 Fixed: The switch was not displaying the previously saved value. For example, if it was unchecked before, reopening the fragment would incorrectly show it as checked instead of unchecked. 2025-04-14 18:39:11 +05:30
MohitMaliFtechiz
1d3944dab5 Refactored the KiwixSearchView to use externally provided placeholder for searchView.
* Created the `PageFragmentScreenState` to encapsulates the all UI-related state to reduce the complexity in fragment.
2025-04-14 18:39:11 +05:30
MohitMaliFtechiz
acbf1bfec3 Fixed: When selecting page items the changes are not reflecting in UI.
* Improved the clicking on page item.
* Fixed: Page items are not showing updating after deleting.
* Fixed: Switch was not disabling when selecting the page items.
* Added SearchView, navigationIcon, and menuItems to page fragment.
2025-04-14 18:39:11 +05:30
MohitMaliFtechiz
bceebd5de4 Migrated BookmarkFragment, HistoryFragment, and NotesFragment to Jetpack Compose.
* Created a `PageScreen` composable, which serves as the base screen for all these fragments. Each fragment can customize it as needed.
* Introduced a reusable `PageListItem` composable for consistent list item rendering.
* Added an extension function to convert the favicon to a Compose ImageBitmap. If no favicon is available, it falls back to the default ZIM icon, maintaining behavior from the XML-based UI.
2025-04-14 18:39:11 +05:30
Kelson
45724dca02
Merge pull request #4281 from kiwix/Fixes#4280
Fixed: Notification not showing when downloading ZIM files in custom apps.
2025-04-14 12:23:20 +02:00
MohitMaliFtechiz
d70f30b86e Fixed: Notification not showing when downloading ZIM files in custom apps.
* The issue occurred because the notification permission was not granted. On Android 13 and above, notifications won't appear without explicit permission.
* To fix this, we now properly request the notification permission on devices running Android 13 and above.
2025-04-10 18:40:29 +05:30
Kelson
083e9b6103
Merge pull request #4283 from kiwix/Fixes#4282
Fixed: `Input dispatching timed out` error while downloading files from ZIM files.
2025-04-10 14:31:21 +02:00
MohitMaliFtechiz
b8d1b8a4c7 Fixed: Input dispatching timed out error while downloading files from ZIM files.
* Moved the download logic to the IO thread to prevent blocking the main thread.
* Also refactored the code structure slightly to reduce nesting and resolve the NestedBlockDepth lint warning.
2025-04-10 14:38:38 +05:30
Kelson
563e06e302
Merge pull request #4279 from kiwix/Fixes#4278
Fixed: Application crashes on `FetchDownloadNotificationManager.getCancelNotification` method.
2025-04-10 09:21:00 +02:00
MohitMaliFtechiz
56b94cb5cf Fixed: Application crashes on FetchDownloadNotificationManager.getCancelNotification method.
* The issue occurred when the user paused a download from the notification while the application was in the background and only a single download was active. At that point, a paused notification was posted on the IO thread to inform the user, and shortly after, the same notification was set on the foreground service. Due to a timing conflict, both notifications were being processed simultaneously, leading to a crash.
* To fix this, a synchronization lock is added inside the `getCancelNotification` method to ensure that only one thread can access the notification builder at a time.
2025-04-09 11:29:46 +05:30
Kelson
ef9a7a2129
Merge pull request #4275 from kiwix/minor_improvement_in_uploading_aab_for_custom_aaps
Fixed: AAB file was not found when uploading to Play Store for custom apps.
2025-04-03 15:17:43 +02:00
MohitMaliFtechiz
1d1c3f3f63 Fixed: AAB file was not found when uploading to Play Store for custom apps.
* Since we upgraded Gradle, we switched to using `layout.buildDirectory` instead of `buildDir`, as the latter is now deprecated. The new approach returns a DirectoryProperty object instead of a direct build directory path. This caused our custom apps' CD pipeline to be unable to locate the generated `.aab` file. We have now updated the code to correctly retrieve the directory path from the `DirectoryProperty` object.
2025-04-03 17:15:52 +05:30
Kelson
bb25fcaaf5
Merge pull request #4274 from kiwix/Fixes#4273
Fixed: After upgrading Gradle, we were unable to upload the AAB because APK splitting was enabled.
2025-04-03 12:51:49 +02:00
MohitMaliFtechiz
53e6cf3f92 Fixed: After upgrading Gradle, we were unable to upload the AAB because APK splitting was enabled.
* ABI splitting is now enabled only when needed (i.e., when building an APK) through an environment variable (APK_BUILD). By default, ABI splitting remains disabled.
* Refactored the workflow to align with this change.
* Updated the README to document this change, ensuring that everyone is aware of this feature.
2025-04-03 15:14:07 +05:30
Kelson
4236be8d40
Merge pull request #4267 from jackq97/#4160-migrate-language-fragment-to-compose
Feat: Language fragment to jetpack compose screen
2025-04-02 18:50:31 +02:00
MohitMaliFtechiz
630446c2e2 Fixed: Extra top margin in KiwixAppBar when opening KiwixSearchView.
* The issue occurred because our application already has `Edge-To-Edge` mode enabled, but Compose's `TopAppBar` automatically adds a top margin when insets change. This resulted in double padding in the toolbar.
* To fix this, we now apply only the side insets to the toolbar, as the top insets are already handled.
2025-04-02 15:22:58 +05:30
jaskaran
852849389e feat: language fragment to jetpack compose
- used minimumInteractiveComponentSize() on the modifier to avoid "Touch target" accessibility issue.
- added compose dimes to previous missed elements.
- added content description for clear icon button in search view.
2025-04-02 15:20:13 +05:30
jaskaran
56e0c1c7b1 feat: language fragment to jetpack compose
- added orders to the test rule to avoid retries error in tests.
- renamed content lambda to "navigationIcon".
- removed redundant "Experimental api" from kiwixSearchView.
- added appropriate text size for kiwixSearchView.
2025-04-02 15:20:13 +05:30
jaskaran
90830da5ca feat: language fragment to jetpack compose
- added orders to the test rule to avoid retries error in tests.
- renamed content lambda to "navigationIcon".
- removed redundant "Experimental api" from kiwixSearchView.
- added appropriate text size for kiwixSearchView.
2025-04-02 15:20:13 +05:30
jaskaran
1fc4e505a2 feat: language fragment to jetpack compose
- simplified app search bar
- renamed the search bar to KiwixSearchView
- added text clearing icon within the textview to
simplify icon logic in app bar
2025-04-02 15:20:13 +05:30
jaskaran
695446e291 feat: language fragment to jetpack compose
- added inner padding to scaffolding to account for topAppBar.
- moved AppBarTextField to ui/components so it can be re-used.
- shifted hardcoded values to ComposeDimens.
- Added ContentLoadingProgressBar modified it to support
Indeterminate mode
- further decoupling of composable functions
2025-04-02 15:20:13 +05:30
jaskaran
583cc7241e feat: language fragment to jetpack compose
- improved animations
2025-04-02 15:20:13 +05:30
jaskaran
0c47337512 feat: language fragment to jetpack compose
- further decoupled the code, shortened the functions.
- fixed all detekt long method errors
- removed a lot of redundant code
2025-04-02 15:20:13 +05:30
jaskaran
1cffeb5eac feat: language fragment to jetpack compose
- further decoupled the code, shortened the functions.
- fixed all detekt long method errors
- removed a lot of redundant code
2025-04-02 15:20:13 +05:30
jaskaran
e6271e9977 Feat: Language fragment to jetpack compose screen
- screen refinement
- removed redundant code
- Removed previews to reduce functions size
2025-04-02 15:20:13 +05:30
jaskaran
620b8b1549 Feat: Language fragment to jetpack compose screen
- screen refinement
- removed redundant code
2025-04-02 15:20:13 +05:30
jaskaran
d32de91060 Feat: Language fragment to jetpack compose screen
- retry rule fix
2025-04-02 15:20:13 +05:30
jaskaran
3e42aa3725 Feat: Language fragment to jetpack compose screen
- De-coupled and lifted the states of language screen.
- added preview to language screen to better manage the ui.
- added tests.
- updated the animation logic to Launched effects to avoid circular dependency.
2025-04-02 15:20:13 +05:30
Kelson
e939ff770d
Merge pull request #4231 from kiwix/Fixes#4165
Added support for Android 16.
2025-04-01 20:17:34 +02:00
MohitMaliFtechiz
37f4dd382f Fixed: Hiding keyboard reset the search filter on Android 16. 2025-04-01 15:41:36 +05:30
MohitMaliFtechiz
01df6fe822 Fixed: The DownloadTest, and InitialDownloadTest sometimes failing on Android 16.
* Removed some unused code from project.
2025-03-31 17:29:00 +05:30
MohitMaliFtechiz
05e231579b Fixed: Compilation issues in unit test cases. The issue was in Gradle itself, which was preventing us from merging or excluding duplicate META-INF files.
* Upgraded Gradle to `8.11.0-alpha03` for better support for Android 16.
* Upgraded the Gradle wrapper to `8.13`, the latest version.
* Fixed: Some deprecated methods in the custom app's Gradle. The new methods for registering tasks are better than the previous ones, which is why Gradle deprecated the older methods.
* Refactored the `createDynamically` task for custom apps according to new gradle.
* Fixed: Some lint and detekt issues.
2025-03-31 15:27:31 +05:30
MohitMaliFtechiz
993c13f85e Fixed: Test cases were failing on the Android 16 emulator due to the stylus_handwriting_enabled setting being enabled by default, which displays a hint dialog when a text field takes focus. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
0bdfaf4541 Added Android 16 emulator in CI to run the test cases on it. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
16525b270f Upgraded gradle to 8.10.0-alpha08 to support Android 16 properly. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
c669207c46 Fixed detekt and codefactore issues 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
f34d46cc7b Added target, compileSdkVersion versions since now there are sources available for SDK 36. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
5d88048976 Upgraded the org.jetbrains.kotlinx:kotlinx-coroutines-rx3 to version 1.10.1.
* Upgraded the `androidx.test:orchestrator` to version `1.5.1`.
* Upgraded the `androidx.constraintlayout:constraintlayout` to version `2.2.0`.
* Fixed the last lint issue.
2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
b1fa6ac998 Upgraded the com.googlecode.json-simple to version 1.1.1. * Upgraded the com.squareup.okhttp3:okhttp to version 4.12.0. * Fixed remaining deprecated object. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
54811ed897 Fixed: lint error. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
e472d11dc2 Refactored the java.util.Locale constructor, which is deprecated in Android 16. * Created to utilize the methods introduced in this Android version. * Upgraded AGP to , which supports Android 16. * Replaced targetSdkVersion and compileSdkVersion with targetSdkPreview and compileSdkPreview to add support for Android 16. * After upgrading the gradle lint showing some new errors so we have fixed those lint errors that required us to use the KTX extension functions, as they internally utilize the same functions we were using. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
fbe7712b03 Added support for Android 16. * Upgraded the AGP to which supports Android 16.
* Replaced the  and  with , and  to add support for Android 16.
2025-03-31 12:11:09 +05:30
Kelson
eeba4efdc6
Merge pull request #4217 from SOUMEN-PAL/4159-migrate-help-fragment-to-compose
4159 migrate help fragment to compose
2025-03-28 16:02:31 +01:00
MohitMaliFtechiz
bd5a9129bf Fixed: Memory leak in KiwixSettingFragment. 2025-03-28 13:02:20 +01:00
MohitMaliFtechiz
1debc8269c Fixed: TopLevelDestinationTest, and GetContentShortcutTest test cases which was failing due to migration to jetpack. 2025-03-28 13:02:20 +01:00
MohitMaliFtechiz
4cdae0f601 Refactored the ErrorActivityTest according to new compose UI.
* Removed unnecessary rules from lintConfig file.
* Refactored the `HelpFragmentTest` according to compose UI.
2025-03-28 13:02:20 +01:00
MohitMaliFtechiz
8e3a4c585b Fixed the design of the HelpScreen to match the previous one.
* Fixed the arrow icon size.
* Fixed the description size and color. Also, made it support web links as it did in the XML-based design.
* Removed unused code from the project.
2025-03-28 13:02:20 +01:00
MohitMaliFtechiz
056b809717 Improved the divider height on HelpScreen to match the previous design. 2025-03-28 13:02:20 +01:00
MohitMaliFtechiz
64db5ad3e5 Removed the unnecessary compose dependencies from project.
* Removed the unnecessary overriding of rows since we are not showing these rows in custom apps.
* Used `KiwixTheme` instead of hardcoded colors.
* Used the `KiwixAppBar` instead of manually created `AppBar`.
* Refined the `HelpScreen` for better readability and maintainability.
2025-03-28 13:02:20 +01:00