fix path equality check

This commit is contained in:
Hongtao Zhang 2022-11-24 16:46:20 -06:00
parent ec810865cc
commit 2da557c2db
No known key found for this signature in database
GPG key ID: 75F655B91C7AC9BB

View file

@ -1,7 +1,6 @@
using Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo;
using Flow.Launcher.Plugin.Explorer.Search.Everything;
using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
using Flow.Launcher.Plugin.Explorer.Search.WindowsIndex;
using Flow.Launcher.Plugin.SharedCommands;
using System;
using System.Collections.Generic;
@ -31,12 +30,12 @@ namespace Flow.Launcher.Plugin.Explorer.Search
public bool Equals(Result x, Result y)
{
return x.SubTitle == y.SubTitle;
return x.Title == y.Title && x.SubTitle == y.SubTitle;
}
public int GetHashCode(Result obj)
{
return obj.SubTitle?.GetHashCode() ?? 0;
return HashCode.Combine(obj.Title.GetHashCode(), obj.SubTitle?.GetHashCode() ?? 0);
}
}