Skip to content

Commit

Permalink
Improved the behavior of enabling menu buttons.
Browse files Browse the repository at this point in the history
* Previously, when a ZIM file was in the process of opening, the reopenBook method was used to hide the "Open Library" button if it was visible. However, this method also enabled the menu buttons. If an error occurred while loading the ZIM file, the controls remained enabled, which was not desirable. Now, the "Open Library" button is hidden, and the menu buttons are shown only after the ZIM file has successfully loaded. If an error occurs during loading, an error message is displayed (as it was previously), and the UI is updated accordingly.
  • Loading branch information
MohitMaliDeveloper authored and kelson42 committed Jan 19, 2025
1 parent c60ea98 commit 85427c4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,8 @@ abstract class CoreReaderFragment :
if (zimReaderSource.canOpenInLibkiwix()) {
// Show content if there is `Open Library` button showing
// and we are opening the ZIM file
reopenBook()
hideNoBookOpenViews()
contentFrame?.visibility = View.VISIBLE
openAndSetInContainer(zimReaderSource)
updateTitle()
} else {
Expand Down

0 comments on commit 85427c4

Please sign in to comment.