mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Check action keywords without order
This commit is contained in:
parent
34cb078602
commit
4ebc19a82d
1 changed files with 7 additions and 3 deletions
|
|
@ -418,11 +418,15 @@ namespace Flow.Launcher.Core.Plugin
|
|||
}
|
||||
}
|
||||
|
||||
private static bool CheckActionKeywordChanged(IReadOnlyList<string> oldActionKeyword, IReadOnlyList<string> newActionKeyword)
|
||||
private static bool CheckActionKeywordChanged(IReadOnlyList<string> oldActionKeywords, IReadOnlyList<string> 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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue