post_actions: refresh bookmarks grid on unsave

unsave_from_preview only refreshed the library grid when on the
library tab. Now also refreshes the bookmarks grid when on the
bookmarks tab so the saved dot clears immediately.
This commit is contained in:
pax 2026-04-11 23:24:35 -05:00
parent 61403c8acc
commit 2824840b07

View File

@ -193,9 +193,12 @@ class PostActionsController:
if fav.post_id == post.id and i < len(bm_grid._thumbs): if fav.post_id == post.id and i < len(bm_grid._thumbs):
bm_grid._thumbs[i].set_saved_locally(False) bm_grid._thumbs[i].set_saved_locally(False)
break break
# Refresh library tab if visible # Refresh the active tab's grid so the unsaved post disappears
# from library or loses its saved dot on bookmarks.
if self._app._stack.currentIndex() == 2: if self._app._stack.currentIndex() == 2:
self._app._library_view.refresh() self._app._library_view.refresh()
elif self._app._stack.currentIndex() == 1:
self._app._bookmarks_view.refresh()
else: else:
self._app._status.showMessage(f"#{post.id} not in library") self._app._status.showMessage(f"#{post.id} not in library")
self._app._popout_ctrl.update_state() self._app._popout_ctrl.update_state()