fix(main): populate the search field and results on history click in wide mode

HistoryEntryClicked in wide mode only called SearchAndLoadArticle,
which never updates searchQuery, so the field stayed empty and the
results pager took the query.isBlank() branch with PagingData.empty().
Now dispatch onSearchQueryChanged first, then SearchAndLoadArticle.
This commit is contained in:
OneWay committed 2026-10-07 00:43:15 +08:00
1 parent 5b6bb08248
commit 5a0426c864
1 file changed
+1
@@ -93,6 +93,7 @@ fun MainRoute(
searchViewModel.saveScrollPosition(action.index, action.offset)
is MainAction.HistoryEntryClicked ->
if (isWide) {
searchViewModel.onSearchQueryChanged(action.query)
searchViewModel.onAction(SearchAction.SearchAndLoadArticle(action.query))
} else {
searchViewModel.onSearchQueryChanged(action.query)