From 05f8aefbd38bc9f32c1b4879405688dba256d53e Mon Sep 17 00:00:00 2001 From: Victor239 <12621257+Victor239@users.noreply.github.com> Date: Mon, 23 Mar 2026 11:44:03 +0000 Subject: [PATCH] fix: Resort library view after book updates After a successful download or metadata update, refresh_ids() was called to update the display data for changed rows, but the library view was not resorted. This meant books sorted by a column that FanFicFare had just written would not reorder into their correct position until the user manually triggered a sort. Added a resort() call on the library view model after all_ids are refreshed so the current sort order is re-applied automatically. --- calibre-plugin/fff_plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/calibre-plugin/fff_plugin.py b/calibre-plugin/fff_plugin.py index 69ead2e2..558215ff 100644 --- a/calibre-plugin/fff_plugin.py +++ b/calibre-plugin/fff_plugin.py @@ -1951,6 +1951,9 @@ class FanFicFarePlugin(InterfaceAction): if len(update_list): self.gui.library_view.model().refresh_ids(update_ids) + if all_ids: + self.gui.library_view.model().resort() + current = self.gui.library_view.currentIndex() self.gui.library_view.model().current_changed(current, self.previous) self.gui.tags_view.recount()