* Now, we primarily utilize the `FileDescriptor` instead of the file in conjunction with the URI for various functionalities. Consequently, we have refactored our note-opening functionality accordingly.
* We are using the `applicationContext` to start the `ErrorActivity`, which is outside the `Activity`. Therefore, to initiate the activity with an external context of the `Activity`, we must include the `FLAG_ACTIVITY_NEW_TASK` flag in the intent. Without this flag, the activity will not start.
* Introduced the 'Support kiwix' option, which is configurable in the navigation for custom apps. If the custom app is set to display the "Support" menu item in navigation, it will be shown; otherwise, it will be hidden from the app.
* Replaced the "kiwix" and "the" prefixes in "Support kiwix" and "About the app" with the app name in the navigation.
* The getEntryByPath method was being called twice when retrieving content. Consequently, the initial call returned the content entry URL with additional parameters. Subsequently, when making the second call with the provided URL, it resulted in an "entry not found" exception. This issue prevented the loading of the CSS and content of the Zim file.
* Additionally, the getActualUrl method was primarily implemented to retrieve the redirect entry of the URL provided by the webView. It is unnecessary to invoke this method when obtaining content.
* Introduced test cases for the new functionality to ensure its expected behavior in both variants, such as Play Store and non-Play Store.
* Updated other test cases to accommodate the testing of this new functionality.
* If the custom app is configured to display the 'About the app' option in navigation, it will be visible. Clicking on it will redirect the user to the configured URL.
* Scan the app-specific directory as well because we have limitations in scanning all directories on Android 11 and above in the Play Store variant. If a user copies the ZIM file to the app-specific directory on the SD card, the scanning of the app-specific directory on the SD card has not been added, resulting in the copied files not being displayed on the library screen. Therefore, we need to explicitly include the app-specific directory for scanning.
* If the ManageExternalStorage permission has not been granted, introduce the request, particularly when accessing features that necessitate this permission, such as downloading ZIM files, selecting a ZIM file from storage via the file picker, and refreshing the list of available ZIM files in storage.
* Removed the unnecessary estimation matches call on `libkiwix`, as we do not need this since `libkiwix` can handle this automatically.
* Cancelled the previously running job if a new searchTerm is in progress; this will avoid unnecessary memory allocation and data load on libkiwix.
* Introduced a search placeholder for custom apps; if any custom app is configured not to show the title in the toolbar, it will display the search placeholder with a border. To implement this change, a layout has been added inside the toolbar.
* To enhance understanding of this change, proper comments have been added to the methods.
* We had restricted the toolbar click to the toolbar title. So, if the user clicked on the title, it would initiate the search. Now, we have removed the restriction of clicking only on the title. If the user taps anywhere on the toolbar except the menu items and hamburger, it will initiate the search.
* Implemented a debouncing mechanism to enhance the handling of search functionalities. This approach is employed to prevent unnecessary data loads from libkiwix, addressing the issue of crashes when users rapidly type and search for results.
* Previously, when exiting full-screen mode, the `WindowCompat.setDecorFitsSystemWindows` configuration was set to `false`, causing a blank space between the sidebar logo and the Bookmark item.
* This change sets the configuration to `true` when exiting full-screen mode to ensure proper adjustment of the sidebar content, eliminating the undesired blank space.
* The adjustment is necessary to maintain a seamless layout and appearance, particularly after transitioning from full-screen mode.
* The `Config.kt` now holds the version information we can directly change the versionCode here and it will automatically replace in both gradle files.
* Removed duplicate version configurations from build.gradle files.
* The issue was caused by an unnecessary increment of the 'currentPiece' index in the onDone callback of the TextToSpeech engine. This double increment led to the skipping of lines. The redundant increment at the end of the method has been removed, ensuring that each line is read correctly.
* We now utilize `AssetFileDescriptor` to open the ZIM file for custom apps. For the search functionality, we are creating a reader with a file object, but we need to create a reader with the `AssetFileDescriptor` instead of a file for custom apps.
* We are now using fileDescriptor to open the zim files with uris when someone tries to open the zim file directly from storage.
* As now we are using the assetFileDescriptor instead of direct files, we have refactored the functionality of saving (note, history, bookmark) so that we can open the same pages on the same zimFile.
* Since we are now using fd (FileDescriptor) to read the zim file from the asset folder. Currently, 'KiwixServer' is unable to host zim files via fd. This feature is temporarily hidden for custom apps. We will re-enable it for custom apps once the issue is resolved.
* In `ZimHostFragment`, we show Zim files that are saved in the database. These files are typically saved when downloading Zim files. In a custom app, where Zim files are already included within the app and not downloaded separately that's why they are not showing on the `ZimHostFragment`, we have addressed this issue by saving the Zim files in the database to ensure they appear in the `ZimHostFragment`.
* Regarding the `FileDescriptor`, there are no file objects available because we read Zim files using `FileDescriptor`. To address this, we have created a `demo.zim` file to save it in the database so that it will be displayed in the `ZimHostFragment`. We handle this file within the `KiwixServer`. When the current Zim file is `demo.zim`, we create an `Archive` object with the `FileDescriptor` to host the Zim file on the `KiwixServer`.
* The problem was that we were saving the note name combined with `zimFileTitle` and `articleTitle`. When opening the saved note from `NotesFragment`, it retrieved the `noteTitle` from the database, which already contained the combined name. Subsequently, when saving the note again, it redundantly combined the name. To resolve this issue, we now extract the `articleName` when updating notes in `NotesFragment`, ensuring that it updates existing notes instead of creating new ones.