fix(AppSearch): ensure app search loader is deactivated when popup is

closed

Otherwise, the loader stays active, which requires users to hit CTRL-F
twice to reopen it again (because it'll first deactivate, then activate
again).

Fixes #7989
This commit is contained in:
Pascal Precht 2022-11-07 15:56:59 +01:00 committed by r4bbit.eth
parent 8d90204e0a
commit df3f3d3d7b
2 changed files with 5 additions and 0 deletions

View File

@ -286,11 +286,13 @@ Item {
function closeSearchPopup() { function closeSearchPopup() {
if (item) if (item)
item.closeSearchPopup() item.closeSearchPopup()
active = false active = false
} }
sourceComponent: AppSearch { sourceComponent: AppSearch {
store: appMain.rootStore.appSearchStore store: appMain.rootStore.appSearchStore
onClosed: appSearch.active = false
} }
} }

View File

@ -14,6 +14,8 @@ Item {
}) })
property alias opened: searchPopup.opened property alias opened: searchPopup.opened
signal closed()
function openSearchPopup(){ function openSearchPopup(){
searchPopup.open() searchPopup.open()
} }
@ -72,6 +74,7 @@ Item {
} }
onClosed: { onClosed: {
searchPopupMenu.dismiss(); searchPopupMenu.dismiss();
appSearch.closed();
} }
onResetSearchLocationClicked: { onResetSearchLocationClicked: {
searchPopup.resetSearchSelection(); searchPopup.resetSearchSelection();