Skip to content

Commit 4ebc19a

Browse files
committed
Check action keywords without order
1 parent 34cb078 commit 4ebc19a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,15 @@ public static void ReplaceActionKeyword(string id, IReadOnlyList<string> oldActi
418418
}
419419
}
420420

421-
private static bool CheckActionKeywordChanged(IReadOnlyList<string> oldActionKeyword, IReadOnlyList<string> newActionKeyword)
421+
private static bool CheckActionKeywordChanged(IReadOnlyList<string> oldActionKeywords, IReadOnlyList<string> newActionKeywords)
422422
{
423-
if (oldActionKeyword.Count != newActionKeyword.Count)
423+
if (oldActionKeywords.Count != newActionKeywords.Count)
424424
return true;
425-
return oldActionKeyword.Where((t, i) => t != newActionKeyword[i]).Any();
425+
426+
var sortedOldActionKeywords = oldActionKeywords.OrderBy(s => s).ToList();
427+
var sortedNewActionKeywords = newActionKeywords.OrderBy(s => s).ToList();
428+
429+
return !sortedOldActionKeywords.SequenceEqual(sortedNewActionKeywords);
426430
}
427431

428432
public static void ReplaceActionKeyword(string id, string oldActionKeyword, string newActionKeyword)

0 commit comments

Comments
 (0)