* 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.
* 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.
* The getExternalFilesDirs method only returns the USB path for devices running Android 9 (API 28) and below.
* On Android 10 (API 29) and above, this method returns null when accessing external storage like USB sticks.
* To work around this limitation, we previously appended the /mnt/media_rw/ path manually. While this worked in most cases, it was unreliable across different devices, as the mounted path could vary.
* To ensure accurate retrieval of external storage paths, we have switched to the StorageService API.
* This API, introduced in Android 11 (API 30), directly provides the actual mount paths for all external storage devices, including SD cards, USB sticks, and external hard drives.
* For Android 9 and below, getExternalFilesDirs continues to work as expected, so we use it where applicable.
* This improvement ensures that USB and SD card paths are retrieved correctly on modern Android devices.
* Added debugging logs to capture errors when opening a file in the reader.
* These logs will help us diagnose issues when users share a diagnostic report.
* Displaying a proper error message with the full ZIM path when there is an issue opening the ZIM file or if the selected file is not a valid ZIM file.
* Refactored `CopyMoveFileHandlerTest` to align with this change.
* Updated the documentation to help translators understand this update.
* To resolve the lint error, all string files have been updated. These files will be automatically updated in the latest TranslateWiki PR.
* Preserved search query across lifecycle changes to restore it when the fragment becomes visible again.
* Previously, when the device went to sleep, `viewLifecycleOwner` closed the search view due to lifecycle events, resetting the search.
* Now, the query is stored in `ViewModel` (which is lifecycle-aware) and restored when the online library screen is reopened.
* Search is reset only when the user explicitly clears it.
* Improved restoration of web view history after opening a searched article.
* Refactored `restoreViewStateOnValidJSON` and `restoreViewStateOnInvalidJSON` methods to save and retrieve web view history from the Room database.
* Added detailed comments to methods for better understanding, including guidance for developers to check subclass implementations before making modifications.
* Fixed the `static analysis` errors.
* Added a new "Downloading:" section in `OnlineFragment` to display currently downloading books at the top.
* The language, and search filter will not affect this meaning if a user selects another language and searches any ZIM file via the search feature, the "Downloading:" section always shows on the top and the filter will be applied to the remaining books.
* The issue was that we were setting the bottom margin to `0` when the fragment was moved to the background (i.e., when switching fragments) to prevent the bottom margin from affecting other screens. This was applied to the `NavHostContainer`, which hosts the reader fragment. Enabling the bottom margin when the fragment view is created worked in most cases. However, on Android 15, the system saves the fragment state and does not recreate the view, which means our margin-setting logic was not executed. As a result, the `bottomAppBar` appeared to disappear, but in reality, it was rendering behind the `BottomNavigationView` (the three options at the bottom).
* To fix this, we now set the bottom margin in the `onResume` method so that whenever the reader screen becomes visible, the bottom margin is automatically adjusted.
* 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.
* 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.
* 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.
* 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.