mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Improved the behavior of enabling menu buttons.
* 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.
This commit is contained in:
parent
c60ea98b73
commit
85427c4551
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user