Skip to content

Commit

Permalink
Fixed: Content is not displaying after opening the ZIM file from Chrome.
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
MohitMaliDeveloper committed Feb 8, 2024
1 parent 7b50fb7 commit 0373ac6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0373ac6

Please sign in to comment.