8455 Commits

Author SHA1 Message Date
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
Kelson
d4ebe42d49
Merge pull request #4258 from kiwix/Fixes#4250
Migrated the `AddNoteDialog` to jetpack.
2025-03-12 05:53:06 +01:00
MohitMaliFtechiz
b309032241 Fixed: testNoteEntryIsRemovedFromDatabaseWhenDeletedInAddNoteDialog failing on API level 25. 2025-03-11 19:21:22 +05:30
MohitMaliFtechiz
df67f91b0a Removed the unused code from project, and improve the cursor position when opening the saved notes. 2025-03-11 16:30:40 +05:30
MohitMaliFtechiz
0ed106cf81 Added KiwixDialogTheme to ensure consistent dialog styling with the app's light and dark themes. 2025-03-11 15:31:01 +05:30
MohitMaliFtechiz
e153bfc38a Improved the toolbar's title in night theme according to our theme. 2025-03-11 14:57:32 +05:30
MohitMaliFtechiz
f918fe4eff Fixed: Prevented false note edits when clicking at the end of a saved note, as onTextChange was triggered due to cursor movement rather than actual text changes. 2025-03-11 14:08:41 +05:30
MohitMaliFtechiz
58b32b5350 Fixed: The NoteFragmentTest was failing.
* Improved the setting of text in noteTextField for better maintainability.
2025-03-11 12:44:40 +05:30
MohitMaliFtechiz
4444a6f236 Refactored the NoteFragmentTest to test with compose UI.
* Added testing tags to our compose UI components which help us to test the compose UI.
2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
3162d38ff9 Corrected the actionButton color of snackbar according the light/dark theme. 2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
f24e28ed45 Improved the SnackbarHostStateExtension for better reusability. 2025-03-10 18:35:28 +05:30