From 0373ac6c70e42b2fc806b183527799521bda152b Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Thu, 25 Jan 2024 18:57:17 +0530 Subject: [PATCH] Fixed: Content is not displaying after opening the ZIM file from Chrome. * Although the ZIM file is loaded, it does not appear in the reader because the "Open Library" button is already visible, and the content view is hidden at this point. To address this, we utilized our `reopenBook()` method when loading the ZIM file in reader, which manages the visibility of these views. --- .../org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt index 8091cf4633..f7a8fd15f6 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt @@ -1454,6 +1454,10 @@ abstract class CoreReaderFragment : protected fun openZimFile(zimReaderSource: ZimReaderSource, isCustomApp: Boolean = false) { if (hasPermission(Manifest.permission.READ_EXTERNAL_STORAGE) || isCustomApp) { if (zimReaderSource.canOpenInLibkiwix()) { + // Show content if there is `Open Library` button showing + // and we are opening the ZIM file + // see https://github.com/kiwix/kiwix-android/pull/3624 + reopenBook() openAndSetInContainer(zimReaderSource) updateTitle() } else {