Skip to content

Commit 655b017

Browse files
committed
Code quality
1 parent 00ac327 commit 655b017

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -698,16 +698,6 @@ private ResultsViewModel SelectedResults
698698
Results.Visibility = Visibility.Collapsed;
699699
_queryTextBeforeLeaveResults = QueryText;
700700

701-
if(HistorySelected())
702-
{
703-
// If we are returning from query results and we have not set select item yet,
704-
// we need to clear the preview selected item
705-
if (isReturningFromQueryResults && _selectedItemFromQueryResults.HasValue && _selectedItemFromQueryResults.Value)
706-
{
707-
PreviewSelectedItem = null;
708-
}
709-
}
710-
711701
// Because of Fody's optimization
712702
// setter won't be called when property value is not changed.
713703
// so we need manually call Query()
@@ -720,6 +710,16 @@ private ResultsViewModel SelectedResults
720710
{
721711
QueryText = string.Empty;
722712
}
713+
714+
if (HistorySelected())
715+
{
716+
// If we are returning from query results and we have not set select item yet,
717+
// we need to clear the preview selected item
718+
if (isReturningFromQueryResults && _selectedItemFromQueryResults.HasValue && _selectedItemFromQueryResults.Value)
719+
{
720+
PreviewSelectedItem = null;
721+
}
722+
}
723723
}
724724

725725
_selectedResults.Visibility = Visibility.Visible;

0 commit comments

Comments
 (0)