mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Fix SearchSource editing when action keyword is not changed (#856)
* Fixed SearchSource edit * Remove temp var
This commit is contained in:
@@ -96,11 +96,10 @@ namespace Wox.Plugin.WebSearch
|
|||||||
|
|
||||||
private void EditSearchSource()
|
private void EditSearchSource()
|
||||||
{
|
{
|
||||||
var keyword = _searchSource.ActionKeyword;
|
var newKeyword = _searchSource.ActionKeyword;
|
||||||
if (!PluginManager.ActionKeywordRegistered(keyword))
|
var oldKeyword = _oldSearchSource.ActionKeyword;
|
||||||
|
if (!PluginManager.ActionKeywordRegistered(newKeyword) || oldKeyword == newKeyword)
|
||||||
{
|
{
|
||||||
var newKeyword = keyword;
|
|
||||||
var oldKeyword = _oldSearchSource.ActionKeyword;
|
|
||||||
var id = _context.CurrentPluginMetadata.ID;
|
var id = _context.CurrentPluginMetadata.ID;
|
||||||
PluginManager.ReplaceActionKeyword(id, oldKeyword, newKeyword);
|
PluginManager.ReplaceActionKeyword(id, oldKeyword, newKeyword);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user