8421 Commits

Author SHA1 Message Date
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
MohitMaliFtechiz
bf4ff3c22f Added AddNoteDialogScreen and created a snackBarHostState extension to show the Snackbar on every screen.
* Removed unused code from the project.
* Refactored all `AddNoteDialog` code to use the Compose screen.
* Implemented a way to dynamically enable/disable menu items as needed, such as on the AddNoteDialog screen.
* Some code improvements.
2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
adc4d8eaf3 Implemented reusable Compose-based KiwixAppBar (Toolbar) for all screens, allowing each fragment to customize its UI. Added optional search bar support for fragments that require it. 2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
60a9f7a3b8 Using colors from our compose Color file instead of XML-based color file since the XML-based file will be removed in future. 2025-03-10 18:35:28 +05:30
Kelson
d3f8c254e2
Merge pull request #4261 from kiwix/refactored_zim_file_rendering_test
Refactored the `ZimFileRendering` test to align with the new ZIM file, as the content of the `mainPage` in `wikipedia_fr_climate_change_mini` has changed.
2025-03-10 12:48:40 +01:00
MohitMaliFtechiz
5dfb9ed6b5 Refactored the ZimFileRendering test to align with the new ZIM file, as the content of the mainPage in wikipedia_fr_climate_change_mini has changed. 2025-03-10 14:37:38 +05:30
Kelson
6a8fa05750
Merge pull request #4253 from kiwix/Fixes#4249
Migrated the `ErrorActivity` to jetpack.
2025-03-07 23:04:42 +01:00
MohitMaliFtechiz
1a166d70f5 Fixed: The ErrorActivityTest. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
48796ae67e Improved the folder structure for compose.
* Renamed `ComposeButton` to `KiwixButton` for consistency and to align with the app theme.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
5ea7e86277 Refined the Compose dependencies.
* Refactored the dependencies to be included only in the modules where they are required.
* Removed unnecessary dependencies from the project.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
1743d7b231 Added ErrorActivity UI test case for testing the compose UI.
* Removed the unused code from project.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
cca03cc06e Refactored the ErrorActivity to support edgeToEdge feature introduced in Android 15. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
6fb8620057 Refined the checkbox text to use style from MaterialTheme.
* Refined the `ComposeButton` according to our theme.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
ea089e09f2 Minor fixes in UI of ErrorActivity.
* Fixed ktlint issue.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
fb4dec2b51 Created the Typography file to manage the Material design guidelines for our textView 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
000f9bfe1d Created KiwixTheme for compose so that we use it everywhere. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
fd47586e40 Created ComposeDimens to Centralize dimensions and avoiding harcoding the values everwhere in code for better maintainability and consistency 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
307b6b080c Created ErrorActivityScreen.kt class for handing the compose UI separately to maintain the separate concern. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
55bcccce8c Migrating the ErrorActivity in jetpack.
* Added the jetpack compose libraries in project.
2025-03-07 23:04:07 +01:00
Kelson
79f24b0b61
Merge pull request #4257 from kiwix/Fixes#4256
Migrated the deprecated `detekt` rules to new rules.
2025-03-07 22:58:07 +01:00
MohitMaliFtechiz
c5cc0cdd4c Migrated the deprecated detekt rules to new rules.
* Refactored the code according to the new rules of detekt.
2025-03-07 22:57:34 +01:00
Kelson
f96ab4d44d
Merge pull request #4229 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2025-03-06 13:28:55 +01:00
translatewiki.net
b36e96e2ab
Localisation updates from https://translatewiki.net. 2025-03-06 13:05:53 +01:00
Kelson
e1b960dcdd
Merge pull request #4255 from kiwix/Fixes#4234
Fixed: Transparent images were not visible in "Dark mode".
2025-03-04 18:24:32 +01:00
MohitMaliFtechiz
20b19cdf46 Fixed: Transparent images were not visible in "Dark mode".
* Added a white background to transparent images so that when reading a ZIM file in "Dark mode," the content of transparent images displays properly.
* Added some debug logs in reader which will help us in diagnosing the problem if any occurred.
2025-03-04 17:38:41 +05:30
Kelson
86f38528f9
Merge pull request #4251 from amanna13/4236-improve-download-notification-strings
#4236 Improved download notification strings replacing default Fetch
2025-03-01 08:59:09 +01:00
Ambarish Manna
9fbf92a9d7 Merge branch 'main' of https://github.com/amanna13/kiwix-android into 4236-improve-download-notification-strings 2025-02-28 20:39:10 +05:30
Ambarish Manna
4a1da8b81e #4236 Improved download notification strings replacing default Fetch's string 2025-02-28 20:37:56 +05:30
Kelson
ed5f7160f1
Merge pull request #4240 from kiwix/Fixes#4237
Fixed: Duplicate download completed notifications showing.
2025-02-27 17:36:33 +01:00
MohitMaliFtechiz
e3c261dd9e Fixed: Duplicate download completed notifications showing.
* Two notifications were shown for a completed download when the app was in the background, the download was about to complete, and the app was then opened.
* This occurred because `DownloadMonitorService` pushed a download complete notification before detaching, while the app's lifecycle triggered Fetch to push another notification for the same completed download.
* The fix ensures that any previously completed notification is removed before showing a new one.
2025-02-27 17:36:10 +01:00
Kelson
9a82600496
Merge pull request #4239 from kiwix/Fixes#4235
Fixed: Duplicate resume/cancel buttons in download notification.
2025-02-27 17:35:54 +01:00
Ambarish Manna
ec3076ecb7 #4236 Improved download notification strings replacing default Fetch's string 2025-02-27 21:48:59 +05:30
MohitMaliFtechiz
765da6b651 Fixed: Duplicate resume/cancel buttons in download notification.
* When there is a single download running, and we pause the download from the notification then we push a custom notification and update the foreground service notification. So when we are pushing our custom notification it is performing on the IO thread, and when we are setting it on the foreground service, then instead of updating the same notification it creates a new notification and shows it, and in the meantime, our pushing the cancel notification finishes and push a second notification. Due to the same notification ID, it updates the same notification but its actions(resume/cancel) are added twice.
* We fixed it by synchronizing the process. Now, it first pushes the notification for paused download, and then if there is no other downloading going then it will set the current notification to foreground service.
2025-02-27 13:23:31 +01:00
Kelson
b025813607
Merge pull request #4238 from kiwix/Fixes#4086
Added carriage returns to improve readability in strings.
2025-02-27 13:23:06 +01:00
MohitMaliFtechiz
d5b7013df7 Added carriage returns to improve readability in strings. 2025-02-27 13:03:58 +05:30