diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index cd2913570..48e621126 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -111,7 +111,7 @@ namespace Flow.Launcher.ViewModel while (true) { List queue = new List() { _resultsUpdateQueue.Take() }; - await Task.Delay(50); + await Task.Delay(30); while (_resultsUpdateQueue.TryTake(out var resultsForUpdate)) { diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs index 038cfb4e3..3e464afe1 100644 --- a/Flow.Launcher/ViewModel/ResultsViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs @@ -158,6 +158,11 @@ namespace Flow.Launcher.ViewModel public void AddResults(IEnumerable resultsForUpdates) { var newResults = NewResults(resultsForUpdates); + + // https://social.msdn.microsoft.com/Forums/vstudio/en-US/5ff71969-f183-4744-909d-50f7cd414954/binding-a-tabcontrols-selectedindex-not-working?forum=wpf + // fix selected index flow + SelectedIndex = 0; + lock (_collectionLock) { Results.Update(newResults); @@ -167,7 +172,6 @@ namespace Flow.Launcher.ViewModel { case Visibility.Collapsed when Results.Count > 0: Margin = new Thickness { Top = 8 }; - SelectedIndex = 0; Visbility = Visibility.Visible; break; case Visibility.Visible when Results.Count == 0: @@ -175,6 +179,7 @@ namespace Flow.Launcher.ViewModel Visbility = Visibility.Collapsed; break; } + }