mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[PTRun]Add history plugin (#19569)
* Progress! * Progress... * POC level. * Added ability to delete from history using IPublicAPI * Some sorting, works in some cases. * Rename "Run History" back to just "History". * Updated item from review. * Slight change to PowerLauncher ref, set Copy Local = False * Fixed missing history items if added to history without search term. * Added placeholder unit test project * Updates for new History plugin. * Update Product.wxs, removed useless Unit Test project * Removed actual files for "Microsoft.PowerToys.Run.Plugin.History.UnitTests" * Added history.md, updated ESRPSigning_core.json * Changes for review * Removed now global CodeAnalysis/stylecop
This commit is contained in:
@@ -82,6 +82,11 @@ namespace PowerLauncher.ViewModel
|
||||
RegisterResultsUpdatedEvent();
|
||||
}
|
||||
|
||||
public void RemoveUserSelectedRecord(Result result)
|
||||
{
|
||||
_userSelectedRecord.Remove(result);
|
||||
}
|
||||
|
||||
public void RegisterHotkey(IntPtr hwnd)
|
||||
{
|
||||
Log.Info("RegisterHotkey()", GetType());
|
||||
@@ -566,6 +571,7 @@ namespace PowerLauncher.ViewModel
|
||||
{
|
||||
var plugin = pluginQueryItem.Key;
|
||||
var query = pluginQueryItem.Value;
|
||||
query.SelectedItems = _userSelectedRecord.GetGenericHistory();
|
||||
var results = PluginManager.QueryForPlugin(plugin, query);
|
||||
resultPluginPair[plugin.Metadata] = results;
|
||||
currentCancellationToken.ThrowIfCancellationRequested();
|
||||
@@ -586,6 +592,7 @@ namespace PowerLauncher.ViewModel
|
||||
{
|
||||
var plugin = pluginQueryItem.Key;
|
||||
var query = pluginQueryItem.Value;
|
||||
query.SelectedItems = _userSelectedRecord.GetGenericHistory();
|
||||
var results = PluginManager.QueryForPlugin(plugin, query);
|
||||
resultPluginPair[plugin.Metadata] = results;
|
||||
currentCancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
Reference in New Issue
Block a user