Skip to content

Commit 67d8b20

Browse files
Merge pull request #2202 from JamesNZL/ResultEquals
fix: 🐛 check autocomplete and copy text for `Result` equality
2 parents a48f060 + 5dd0d34 commit 67d8b20

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Flow.Launcher.Plugin/Result.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Runtime;
23
using System.Collections.Generic;
34
using System.IO;
45
using System.Threading.Tasks;
@@ -168,6 +169,8 @@ public override bool Equals(object obj)
168169

169170
var equality = string.Equals(r?.Title, Title) &&
170171
string.Equals(r?.SubTitle, SubTitle) &&
172+
string.Equals(r?.AutoCompleteText, AutoCompleteText) &&
173+
string.Equals(r?.CopyText, CopyText) &&
171174
string.Equals(r?.IcoPath, IcoPath) &&
172175
TitleHighlightData == r.TitleHighlightData;
173176

@@ -177,9 +180,7 @@ public override bool Equals(object obj)
177180
/// <inheritdoc />
178181
public override int GetHashCode()
179182
{
180-
var hashcode = (Title?.GetHashCode() ?? 0) ^
181-
(SubTitle?.GetHashCode() ?? 0);
182-
return hashcode;
183+
return HashCode.Combine(Title, SubTitle, AutoCompleteText, CopyText, IcoPath);
183184
}
184185

185186
/// <inheritdoc />

0 commit comments

Comments
 (0)