mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
code quality
This commit is contained in:
parent
f31abe83b0
commit
764c674350
1 changed files with 5 additions and 4 deletions
|
|
@ -45,11 +45,12 @@ public static class ResultHelper
|
|||
|
||||
public static bool IsEquals(this Result result, LastOpenedHistoryItem item, HistoryStyle style)
|
||||
{
|
||||
bool keyMatches = string.IsNullOrEmpty(result.RecordKey)
|
||||
? item.Title == result.Title
|
||||
: item.RecordKey == result.RecordKey;
|
||||
bool keyMatches = string.IsNullOrEmpty(result.RecordKey) && string.IsNullOrEmpty(item.RecordKey)
|
||||
? item.Title == result.Title
|
||||
: !string.IsNullOrEmpty(result.RecordKey) && !string.IsNullOrEmpty(item.RecordKey) && item.RecordKey == result.RecordKey;
|
||||
|
||||
bool queryMatches = style != HistoryStyle.Query || (result.OriginQuery != null && item.Query == result.OriginQuery.RawQuery);
|
||||
|
||||
bool queryMatches = style != HistoryStyle.Query || item.Query == result.OriginQuery.RawQuery;
|
||||
|
||||
return keyMatches
|
||||
&& queryMatches
|
||||
|
|
|
|||
Loading…
Reference in a new issue