8665 Commits

Author SHA1 Message Date
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
Soumen Pal
55b6ab129d Fixed Linted issuse related to Magic numbers and long methods and did the requested changes 2025-03-28 13:02:20 +01:00
MohitMaliFtechiz
00330273d2 kiwix#4159 migrated Help Fragment to jetpack Compose 2025-03-28 13:02:20 +01:00
Kelson
d5a69757ec
Merge pull request #4263 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2025-03-28 13:01:19 +01:00
translatewiki.net
edadb9dc4e
Localisation updates from https://translatewiki.net. 2025-03-27 13:07:15 +01:00
Kelson
90a3a8ff4c
Merge pull request #4268 from kiwix/Fixes#4266
Migrated the `LocalLibraryFragment` to jetpack.
2025-03-26 02:12:10 +01:00
MohitMaliFtechiz
56b8a16328 Removed unused code from project. 2025-03-25 12:02:46 +05:30
MohitMaliFtechiz
27b208711c Fixed: ComposeContentTestRule was not allowing the test case to be rerun according to our RetryRule because, by default, a Compose rule can only be created once per test case. Due to this, the RetryRule was not working when a flaky test occurred. 2025-03-25 10:44:01 +05:30
MohitMaliFtechiz
de3e2311fe Improve the GetContentShortcutTest to properly detect the menu item. 2025-03-24 20:10:15 +05:30
MohitMaliFtechiz
00f79df953 Improved the selection and deselection of ZIM files for deletion.
* Fixed: A memory leak in `HelpFragment` which is showing after migrating the localLibrary fragment to compose.
2025-03-24 19:48:49 +05:30
MohitMaliFtechiz
4205fc41b7 Fixed: testOpeningFileWithFilePicker test intermittently fails on API level 34.
* Fixed: Memory leaks in `OnlineLibraryFragment` that appeared after upgrading LeakCanary.
* Fixed: Memory leaks in `LocalFileTransferFragment` that appeared after upgrading LeakCanary.
* Fixed: A memory leak in `ZimManageViewModel` caused by `addNetworkInterceptor` holding a reference to progressListener.
2025-03-24 17:58:22 +05:30
MohitMaliFtechiz
6aa0980e4d Fixed: Memory leak in CoreReaderFragment.
* Upgraded the leakCanary to `2.14`.
* Refactored the remaining test cases according to compose UI.
2025-03-24 15:55:38 +05:30
MohitMaliFtechiz
080e518d2b Refactored the test cases according to compose UI. 2025-03-21 18:12:01 +05:30
MohitMaliFtechiz
7d7f726d51 Fixed: SwipeRefreshLayout was not working when the "No Files Here" text was displayed. This was because, by default, this component does not have verticalScroll, which is required to enable the swipe-to-refresh functionality. 2025-03-21 17:01:37 +05:30
MohitMaliFtechiz
075f2c0e8c Created KiwixSnackToastTheme to manage the theme of Toast and Snackbar messages separately from the app's main theme, ensuring consistency and preventing unintended style changes.
* Minor refinement in showing the `NoFileView`.
2025-03-21 16:27:11 +05:30
MohitMaliFtechiz
9a7df5e1d9 Implemented an approach to dynamically show/hide the XML-based bottomNavigationView from compose UI. We will remove this custom logic after we migrate the BottomNavigationView to compose.
* Refactored KiwixAppBar to support the scrolling behavior. By default, it will work as a normal toolbar, if on any screen there is a need to scroll the toolbar then pass the `TopAppBarDefaults.enterAlwaysScrollBehavior()` to `topAppBarScrollBehavior` and it will automatically do the job.
2025-03-21 14:51:43 +05:30
MohitMaliFtechiz
dd45b8a612 Fixed: The swipeRefreshIndicator is showing when disabling the SwipeRefreshLayout.
* Implemented rememberLazyListScrollListener to efficiently handle scrolling events. It triggers onScrollChanged only when the scroll direction changes, reducing unnecessary event triggers and recompositions. This improves performance and allows reuse across multiple screens.
* Refactored KiwixAppBar to optionally auto-hide and show based on scroll behavior when a LazyListState is provided. Simply pass the LazyListState where scrolling behavior is needed, and the toolbar will automatically hide/show as the user scrolls. If no LazyListState is passed, it functions as a standard toolbar.
2025-03-20 19:37:23 +05:30
MohitMaliFtechiz
80fbf74d9a Created LocalLibraryScreenState to encapsulate all UI-related states, reducing state management's complexity. 2025-03-19 17:33:35 +05:30
MohitMaliFtechiz
5b507d8f3d Improved the visibility of permissionDeniedLayout when permission is denied.
* Improved the display of the ZIM file list when permission is granted.
* Displaying the snackBar with Compose UI when there is not enough storage to copy the ZIM file.
* Created the `SwipeRefreshLayout` according to our theme, along with custom logic to enable or disable it, since the default PullToRefresh does not support this feature.
* Created `ContentLoadingProgressBar` to show circular and horizontal progress bars with progress, styled according to our theme.
2025-03-19 15:01:34 +05:30
MohitMaliFtechiz
de46b8f0dd Fixed the clicks on ZIMFile was not working.
* Improved the logic to detect the current running application is a custom app or not.
* Removed the unused code from `LocalLibraryFragment`.
2025-03-18 20:07:59 +05:30
MohitMaliFtechiz
9be780b863 Migrated the LocalLibraryFragment to jetpack.
* Created `LocalLibraryScreen` for compose UI.
* Refactored the `LocalLibraryFragment` functionality with compose.
* Minor refinement in `KiwixAppBar` for title and hamburger icon.
2025-03-18 18:50:53 +05:30
MohitMaliFtechiz
a72d021e95 Refactored the ZimHostFragmentTest according to compose. 2025-03-15 16:10:36 +05:30
MohitMaliFtechiz
6e370a1e74 Fixed: The server was not starting automatically after granting notification/storage permissions, whereas it previously started automatically with the XML-based design.
* Fixed: The link was not clickable and was only displaying as plain text in the TextView.
* Fixed: The TagView UI was not adjusting properly when all tags were displayed.
Fixed: The TagView was not positioned at the bottom and had an unintended bottom margin.
* Fixed: The fonts and sizes of the date, article size, and description were not aligned with our current XML design.
* Fixed: The ZIM files list was not updating on the UI when selecting/deselecting items.
* Removed the `activity_zim_host.xml` file from project since it is unused now.
2025-03-15 13:56:54 +05:30
MohitMaliFtechiz
436a001eb9 Refined the TagView to align with our current night/day theme.
* Adjusted the position of ZimFilesLanguageHeader to match the XML-based layout.
Improved the BookItem design by refining the width and height of the ZIM favicon and adjusting its position. Additionally, fixed an issue where icons were being converted to black and white instead of displaying the original favicon.
* Added a new color (surfaceContainer) to our theme, which will be used for all cards in the application. This ensures that card colors automatically adapt to the current night/day theme.
2025-03-13 19:17:08 +05:30
MohitMaliFtechiz
29d0215984 Refactored the ZimHostFragment to use the ZimHostScreen instead of XML layout. 2025-03-13 15:41:15 +05:30
MohitMaliFtechiz
b608b838a3 Created the TagsView for showing the books tags. 2025-03-13 15:40:03 +05:30
MohitMaliFtechiz
674ff5b24c Refined the BookItem for better readability and maintainability.
* Created `ZimFileLanguageHeader` for showing the languages of ZIM files.
2025-03-13 15:39:05 +05:30
MohitMaliFtechiz
7cdcc0d021 Improved the naming of IconItem's item for better understanding. 2025-03-13 15:34:49 +05:30
MohitMaliFtechiz
a29c33327d Created a Book extension to convert the favicon into a Compose Painter. The previous implementation remains unchanged; if no favicon is available, it will load the default ZIM icon. 2025-03-12 18:00:42 +05:30
MohitMaliFtechiz
31fe534325 Improved the KiwixButton to allow the caller to modify its width and background color, making it reusable in various scenarios. The base implementation remains the same, following our theme. In ZimHostFragment, the button color is dynamically changed based on the server's active or stopped state. 2025-03-12 17:59:03 +05:30
MohitMaliFtechiz
8e09ec66ea Added support for loading ImageBitmap in our IconItem class, allowing us to load any type of image wherever needed.
* Created an extension function (`toPainter()``) to encapsulate the logic, preventing code duplication. Now, we can directly call this function, and it will load the image based on the provided type.
2025-03-12 17:56:06 +05:30
MohitMaliFtechiz
817ec20ad9 Created ZimHostScreen compose screen.
* Created BookItem, and LanguageHeader compose screens which we are showing on the ZimHostScreen.
2025-03-12 17:51:22 +05:30
MohitMaliFtechiz
37681dcb52 Migrated the ZimHostFragment to compose.
* Minor improvements in previous code for better readability.
2025-03-12 17:45:02 +05:30