Show a message when no books found

This commit is contained in:
Kovid Goyal 2017-05-14 09:15:19 +05:30
parent 12c8f8f29c
commit 03e9fe6195
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -253,6 +253,10 @@ def create_books_list(container):
e.scrollIntoView(True) e.scrollIntoView(True)
# Now scroll extra corresponding to top bar size # Now scroll extra corresponding to top bar size
window.scrollBy(0, -container.offsetTop) window.scrollBy(0, -container.offsetTop)
q = loaded_books_query()
if not q.search and library_data.search_result.total_num < 1:
div = component('book_list')
div.appendChild(E.div(_('No books found'), style='margin: 1ex 1em'))
def check_for_books_loaded(): def check_for_books_loaded():