Skip to content

Commit 4676234

Browse files
committed
Use requery instead of clear results
1 parent 2b4f777 commit 4676234

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@ public async Task SetupQuickSwitchAsync(nint handle)
18131813
(Application.Current?.MainWindow as MainWindow).UpdatePosition();
18141814
});
18151815

1816-
_ = ResetWindowAsync(true);
1816+
_ = ResetWindowAsync();
18171817
}
18181818
}
18191819
else
@@ -1824,14 +1824,14 @@ public async Task SetupQuickSwitchAsync(nint handle)
18241824

18251825
if (dialogWindowHandleChanged)
18261826
{
1827-
_ = ResetWindowAsync(true);
1827+
_ = ResetWindowAsync();
18281828
}
18291829
}
18301830
else
18311831
{
18321832
if (dialogWindowHandleChanged)
18331833
{
1834-
_ = ResetWindowAsync(true);
1834+
_ = ResetWindowAsync();
18351835
}
18361836
}
18371837
}
@@ -1933,7 +1933,7 @@ public void HideQuickSwitch()
19331933
}
19341934

19351935
// Reset index & preview & selected results & query text
1936-
private async Task ResetWindowAsync(bool clearResults = false)
1936+
private async Task ResetWindowAsync()
19371937
{
19381938
lastHistoryIndex = 1;
19391939

@@ -1947,12 +1947,7 @@ private async Task ResetWindowAsync(bool clearResults = false)
19471947
SelectedResults = Results;
19481948
}
19491949

1950-
await ChangeQueryTextAsync(string.Empty);
1951-
1952-
if (clearResults)
1953-
{
1954-
ClearResults();
1955-
}
1950+
await ChangeQueryTextAsync(string.Empty, true);
19561951
}
19571952

19581953
#endregion

0 commit comments

Comments
 (0)