From 764c674350a6696bd9d5b646d987504f68f8097d Mon Sep 17 00:00:00 2001 From: 01Dri Date: Tue, 14 Oct 2025 23:15:14 -0300 Subject: [PATCH] code quality --- Flow.Launcher/Helper/ResultHelper.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/Helper/ResultHelper.cs b/Flow.Launcher/Helper/ResultHelper.cs index a0a7b0793..d4732055b 100644 --- a/Flow.Launcher/Helper/ResultHelper.cs +++ b/Flow.Launcher/Helper/ResultHelper.cs @@ -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