dont clear search caches on a redisplay

This commit is contained in:
Kovid Goyal 2023-02-02 20:57:11 +05:30
parent 517d229e08
commit 3eed23619e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -906,13 +906,16 @@ class View:
self.iframe.focus() self.iframe.focus()
is_current_book = self.book and self.book.key == book.key is_current_book = self.book and self.book.key == book.key
self.book_load_started = True self.book_load_started = True
if not is_current_book: if is_current_book:
if not is_redisplay:
self.search_overlay.clear_caches(book) # could be a reload
else:
if self.book: if self.book:
self.iframe_wrapper.reset() self.iframe_wrapper.reset()
self.content_popup_overlay.reset() self.content_popup_overlay.reset()
self.clear_book_resource_caches() self.clear_book_resource_caches()
self.timers.start_book(book) self.timers.start_book(book)
self.search_overlay.clear_caches(book) # could be a reload self.search_overlay.clear_caches(book)
unkey = username_key(get_interface_data().username) unkey = username_key(get_interface_data().username)
self.book = current_book.book = book self.book = current_book.book = book
hl = None hl = None