1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

Help: Sort search results by score

This makes pages with matching titles appear at the top of the search
results.
This commit is contained in:
Tim Ledbetter 2023-04-26 17:23:18 +01:00 committed by Andrew Kaster
parent 556c4ac358
commit 8bb6a820e2

View file

@ -230,7 +230,7 @@ ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window)
m_manual_model = TRY(ManualModel::create());
m_browse_view->set_model(*m_manual_model);
m_filter_model = TRY(GUI::FilteringProxyModel::create(*m_manual_model));
m_filter_model = TRY(GUI::FilteringProxyModel::create(*m_manual_model, GUI::FilteringProxyModel::FilteringOptions::SortByScore));
m_search_view->set_model(*m_filter_model);
m_filter_model->set_filter_term(""sv);