search_controller: reset page to 1 on new search

on_search previously read the page spin value, so a stale page
number from a previous search carried over. Now resets the spin
to 1 on every new search.

behavior change: new searches always start from page 1.
This commit is contained in:
pax 2026-04-11 22:30:23 -05:00
parent a8dfff90c5
commit 3d288a909f

View File

@ -137,7 +137,8 @@ class SearchController:
def on_search(self, tags: str) -> None: def on_search(self, tags: str) -> None:
self._current_tags = tags self._current_tags = tags
self._current_page = self._app._page_spin.value() self._app._page_spin.setValue(1)
self._current_page = 1
self._search = SearchState() self._search = SearchState()
self._min_score = self._app._score_spin.value() self._min_score = self._app._score_spin.value()
self._app._preview.clear() self._app._preview.clear()