View Single Post
Old 07-26-2021, 01:58 PM   #1123
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by chaley View Post
I know nothing about how Reading List does its job. Does it notify the GUI using model.reset() or model.reset_ids() after changing anything? Does it do a cache.clear_caches()?
Not directly. RL calls self.gui.library_view.model().refresh_ids(refresh_ book_ids) (ie, the ids of the books changed) whenever it potentially changes books.

(And gets current from library_view.currentIndex() and calls model().current_changed(current, previous) with a previously saved currentIndex()).

It also sometimes calls self.gui.tags_view.recount(), but not always. I honestly don't know if that's intentional or oversight.

However, one of the places it isn't called is remove_books_from_list(), so let's see if adding tag_views.recount() everywhere refresh_ids() is called corrects the issue with some side-effect.

Test version attached.
Attached Files
File Type: zip Reading List.zip (420.0 KB, 425 views)
JimmXinu is offline   Reply With Quote