fix: search_suggestion submitting externally handled searches

ref #652
This commit is contained in:
tomasklaen
2023-09-30 16:57:36 +02:00
parent 9b251efbd9
commit c88c476ec7

View File

@@ -233,9 +233,16 @@ function Menu:update(data)
self:update_content_dimensions() self:update_content_dimensions()
self:reset_navigation() self:reset_navigation()
end end
-- Execute initial search queries -- Apply search suggestions
for _, menu in ipairs(new_menus) do for _, menu in ipairs(new_menus) do
if menu.search_suggestion then self:search_query_update(menu.search_suggestion, menu) end if menu.search_suggestion then
-- Only internal searches are immediately submitted
if menu.on_search then
menu.search.query = menu.search_suggestion
else
self:search_query_update(menu.search_suggestion, menu)
end
end
end end
self:search_ensure_key_bindings() self:search_ensure_key_bindings()