mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove action keyword first
This commit is contained in:
parent
37ad5aa09b
commit
300d64d661
1 changed files with 7 additions and 5 deletions
|
|
@ -412,14 +412,16 @@ namespace Flow.Launcher.Core.Plugin
|
|||
{
|
||||
if (CheckActionKeywordChanged(oldActionKeywords, newActionKeywords))
|
||||
{
|
||||
// Fix collection modified while iterating exception
|
||||
var oldActionKeywordsClone = oldActionKeywords.ToList();
|
||||
foreach (var actionKeyword in oldActionKeywordsClone)
|
||||
{
|
||||
RemoveActionKeyword(id, actionKeyword);
|
||||
}
|
||||
foreach (var actionKeyword in newActionKeywords)
|
||||
{
|
||||
AddActionKeyword(id, actionKeyword);
|
||||
}
|
||||
foreach (var actionKeyword in oldActionKeywords)
|
||||
{
|
||||
RemoveActionKeyword(id, actionKeyword);
|
||||
}
|
||||
|
||||
// Update action keyword in plugin metadata
|
||||
var plugin = GetPluginForId(id);
|
||||
|
|
@ -445,8 +447,8 @@ namespace Flow.Launcher.Core.Plugin
|
|||
{
|
||||
if (oldActionKeyword != newActionKeyword)
|
||||
{
|
||||
AddActionKeyword(id, newActionKeyword);
|
||||
RemoveActionKeyword(id, oldActionKeyword);
|
||||
AddActionKeyword(id, newActionKeyword);
|
||||
|
||||
// Update action keyword in plugin metadata
|
||||
var plugin = GetPluginForId(id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue