From 4ebc19a82d1dbe8f40f434989d182e5049c76d04 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 23 Feb 2025 19:42:43 +0800 Subject: [PATCH] Check action keywords without order --- Flow.Launcher.Core/Plugin/PluginManager.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index 9a37f6fe5..54f6506d9 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -418,11 +418,15 @@ namespace Flow.Launcher.Core.Plugin } } - private static bool CheckActionKeywordChanged(IReadOnlyList oldActionKeyword, IReadOnlyList newActionKeyword) + private static bool CheckActionKeywordChanged(IReadOnlyList oldActionKeywords, IReadOnlyList newActionKeywords) { - if (oldActionKeyword.Count != newActionKeyword.Count) + if (oldActionKeywords.Count != newActionKeywords.Count) return true; - return oldActionKeyword.Where((t, i) => t != newActionKeyword[i]).Any(); + + var sortedOldActionKeywords = oldActionKeywords.OrderBy(s => s).ToList(); + var sortedNewActionKeywords = newActionKeywords.OrderBy(s => s).ToList(); + + return !sortedOldActionKeywords.SequenceEqual(sortedNewActionKeywords); } public static void ReplaceActionKeyword(string id, string oldActionKeyword, string newActionKeyword)