diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 30036cb10..1d6130c48 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -259,7 +259,7 @@ namespace Flow.Launcher await PluginManager.InitializePluginsAsync(_mainVM); - _mainVM.RefreshLastOpenedHistoryResult(); + _mainVM.RefreshLastOpenedHistoryResults(); // Refresh home page after plugins are initialized because users may open main window during plugin initialization // And home page is created without full plugin list diff --git a/Flow.Launcher/Storage/LastOpenedHistoryResult.cs b/Flow.Launcher/Storage/LastOpenedHistoryResult.cs index 4eb76da1c..7d49df44b 100644 --- a/Flow.Launcher/Storage/LastOpenedHistoryResult.cs +++ b/Flow.Launcher/Storage/LastOpenedHistoryResult.cs @@ -13,7 +13,7 @@ public class LastOpenedHistoryResult : Result public LastOpenedHistoryResult() { - this.OriginQuery = new Query { RawQuery = Query }; + this.OriginQuery = new Query { TrimmedQuery = Query }; } public LastOpenedHistoryResult(Result result) @@ -21,7 +21,7 @@ public class LastOpenedHistoryResult : Result Title = result.Title; SubTitle = result.SubTitle; PluginID = result.PluginID; - Query = result.OriginQuery.RawQuery; + Query = result.OriginQuery.TrimmedQuery; OriginQuery = result.OriginQuery; RecordKey = result.RecordKey; IcoPath = result.IcoPath; @@ -32,10 +32,10 @@ public class LastOpenedHistoryResult : Result Action = _ => { App.API.BackToQueryResults(); - App.API.ChangeQuery(result.OriginQuery.RawQuery); + App.API.ChangeQuery(result.OriginQuery.TrimmedQuery); return false; }; - //Used for last history style reopening, currently need to be assigned at MainViewModel.cs + //Used for Last Opened History style reopening, currently need to be assigned at MainViewModel.cs AsyncAction = null; } @@ -66,13 +66,13 @@ public class LastOpenedHistoryResult : Result return Title == r.Title && SubTitle == r.SubTitle && PluginID == r.PluginID - && Query == r.OriginQuery.RawQuery; + && Query == r.OriginQuery.TrimmedQuery; } else { return RecordKey == r.RecordKey && PluginID == r.PluginID - && Query == r.OriginQuery.RawQuery; + && Query == r.OriginQuery.TrimmedQuery; } } } diff --git a/Flow.Launcher/Storage/QueryHistory.cs b/Flow.Launcher/Storage/QueryHistory.cs index 8b8cbdd90..3c5c7000c 100644 --- a/Flow.Launcher/Storage/QueryHistory.cs +++ b/Flow.Launcher/Storage/QueryHistory.cs @@ -30,7 +30,7 @@ namespace Flow.Launcher.Storage { Title = Localize.executeQuery(item.Query), IcoPath = Constant.HistoryIcon, - OriginQuery = new Query { RawQuery = item.Query }, + OriginQuery = new Query { TrimmedQuery = item.Query }, Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE81C"), Query = item.Query, Action = _ => diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 650c0a34c..844adf4c4 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1367,7 +1367,7 @@ namespace Flow.Launcher.ViewModel /// TODO COMMENT- Requires the plugins to have initialized first because /// it needs the plugin directory paths for initialization /// - internal void RefreshLastOpenedHistoryResult() + internal void RefreshLastOpenedHistoryResults() { _history.PopulateHistoryFromLegacyHistory(); _history.UpdateIcoPathAbsolute();