Ensure overlay is hidden when opening book

This commit is contained in:
Kovid Goyal 2017-02-18 15:28:06 +05:30
parent f19d5a51ae
commit 3634a76107
3 changed files with 3 additions and 0 deletions

View File

@ -325,6 +325,7 @@ class Overlay:
def hide(self):
while self.panels.length:
self.hide_current_panel()
self.container.style.display = 'none'
def delete_book(self):
self.hide_current_panel()

View File

@ -414,6 +414,7 @@ class ReadUI:
if str(current_query[k]) is not str(current_state[k]):
same = False
break
self.view.overlay.hide()
if same:
if current_state.bookpos is not current_query.bookpos and current_query.bookpos:
self.view.goto_bookpos(current_query.bookpos)

View File

@ -280,6 +280,7 @@ class View:
return name, cfi
def display_book(self, book):
self.overlay.hide()
self.book = current_book.book = book
self.ui.db.update_last_read_time(book)
self.loaded_resources = {}