From 11645fdc9a9e22ef39f19a63cf1733bd5835bfb8 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 5 Jan 2026 19:27:11 +1100 Subject: [PATCH] ensure history results ordered by ExecutedDateTime --- Flow.Launcher/ViewModel/MainViewModel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index c3eeada11..6be88ced5 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -357,8 +357,8 @@ namespace Flow.Launcher.ViewModel SelectedResults = History; if (History.Results.Count > 0) { - History.SelectedIndex = 0; - History.SelectedItem = History.Results[0]; + SelectedResults.SelectedIndex = 0; + SelectedResults.SelectedItem = History.Results[0]; } } else @@ -1326,6 +1326,8 @@ namespace Flow.Launcher.ViewModel { var results = new List(); + historyItems = historyItems.OrderByDescending(x => x.ExecutedDateTime); + if (Settings.HistoryStyle == HistoryStyle.LastOpened) { // Items saved to disk are differentiated by Query also, but LastOpened style only cares about unique results