mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
switch to using TrimmedQuery
This commit is contained in:
parent
f9df44a2cd
commit
6d6003fd80
4 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = _ =>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
/// </summary>
|
||||
internal void RefreshLastOpenedHistoryResult()
|
||||
internal void RefreshLastOpenedHistoryResults()
|
||||
{
|
||||
_history.PopulateHistoryFromLegacyHistory();
|
||||
_history.UpdateIcoPathAbsolute();
|
||||
|
|
|
|||
Loading…
Reference in a new issue