* Moved the file-scanning logic to the IO thread, allowing smooth directory scanning or ZIM file preparation from the asset directory while keeping the main thread free.
* Refactored `CustomFileValidatorTest` to align with this change.
* Corrected the ZIM URL in `testZimFileRendering` test.
* Improved the `manageExternalLaunchAndRestoringViewState` for thread safety.
* Removed related test cases and refactored some unit tests to use Room and libkiwix-based classes for test operations.
* Refactored `DownloadRoomEntity` to use Room’s converters instead of ObjectBox.
* Did not remove the `ObjectBox` entity classes and dependencies, since both are still required for migration.
* Removed the code that auto-scrolled the list to show the progress bar. Now, users will see the progress bar only when they scroll down to load more items.
* Improved `isLoadingMoreItem` handling to avoid duplicate `loadMore` calls after appending items
* Fixed: When opening a new ZIM file from the local library and pressing the back button repeatedly, the previously loaded empty ZIM file reappeared in the reader.
* Fixed: Cached book for bookmarks sometimes returned "null" because it wasn’t properly cleared when navigating to other screens.
* Fixed: Tabs were not restoring when navigating to another screen via the bottomAppBar.
* Refactored the "FIND_IN_PAGE" flow — since we can now directly set the result on the previous back stack entry, relaunching the reader screen is no longer required.
* Fixed: Tabs not restoring when returning from left drawer screens.
* The issue occurred because the reader screen route was not being created properly, as both modules had different destination classes. We made the openPage method abstract so that each module can provide its own destination with arguments to correctly open pages.
* Improved WebView creation in Compose.
* The issue occurred because we reopened the settings screen immediately after removing it from the back stack, causing Compose to not settle the previous frame and display a blank screen.
* Resolved by allowing the popBackStack frame to settle before reopening the settings screen.
* Removed some unused code from the project.
* The `BackHandler` of top-level destination fragments was always active, preventing the `MainActivity` handler from being called because the top-level fragment's back handler consumed the back event. As a result, when the back stack was empty, pressing the back button did not exit the application.
* We now dynamically enable the `BackHandler` only while a fragment can handle the back event. Once the fragment has handled it, the handler is disabled so that `MainActivity` can process the back event.
* Cause: The request object emitted after user confirmation was identical to the previous one, so the flow collector skipped it and the fetch was never triggered.
* Solution: Added a `System.nanoTime()` field to the request to ensure a unique emission while still preserving existing values.
* Refactored the `updateOnlineLibraryFilters updates onlineLibraryRequest` according to this new change.
* Fixed: When launching the app fresh (cold start), the search screen could appear before the ZIM file was ready (because ZIM file loading in the reader happens on the IO thread), resulting in no search results. Now, incoming actions are delayed until the ZIM file finishes loading so that search works correctly.
* Fixed: Multiple fragment instances were created when repeatedly opening different fragments via bottomAppBar buttons, causing the back button to bring them to the foreground one by one instead of expected behavior.
* NavBackStackEntry arguments are immutable, so switching to `FIND_IN_PAGE` used arguments from the previous ReaderFragment backstack entry.
* Fixed by popping the old ReaderFragment from the backstack and launching a fresh instance with the new search arguments.
* Fixed: Multiple `SearchScreen` instances showing when repeatedly opening the search screen.
* Fixed: Reader screen showing an older ZIM file after opening a new one and pressing back.
* Refactored `SearchInPreviousScreenTest` according to the new changes.
* Minor improvement in navigation.
* There is a limitation with foreground services — we cannot update a foreground service notification from the background (when the application is not running). Starting with Android 16, foreground services also validate the notification ID to ensure it exists before running; this was not enforced in earlier versions, where it worked fine. When multiple downloads are running in the background and one completes, setting a new notification to the foreground service causes it to stop, which in turn stops all background downloads. Additionally, our foreground service was tied to a specific download ID, so when that download completed, was cancelled, or paused, the service also stopped.
* To fix this, we now show a persistent notification that remains active until all downloads are completed or cancelled. This ensures the foreground service stays active in the background and the network is not suspended while downloads are in progress.