From 6f9a879f58f7decd63521171fa3f12abb6e14469 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 21 Dec 2021 07:19:31 +1100 Subject: [PATCH] remove subtitle highlighting code --- Flow.Launcher.Plugin/Result.cs | 9 +++------ Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 7 +------ .../Helper/ResultHelper.cs | 1 - 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 29f8198ab..6848f6ca5 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Windows.Media; @@ -77,9 +77,7 @@ namespace Flow.Launcher.Plugin /// public IList TitleHighlightData { get; set; } - /// - /// A list of indexes for the characters to be highlighted in SubTitle - /// + [Obsolete("Deprecated as of Flow Launcher v1.9.1. Subtitle highlighting is no longer offered")] public IList SubTitleHighlightData { get; set; } /// @@ -110,8 +108,7 @@ namespace Flow.Launcher.Plugin var equality = string.Equals(r?.Title, Title) && string.Equals(r?.SubTitle, SubTitle) && string.Equals(r?.IcoPath, IcoPath) && - TitleHighlightData == r.TitleHighlightData && - SubTitleHighlightData == r.SubTitleHighlightData; + TitleHighlightData == r.TitleHighlightData; return equality; } diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index 7b5d85ae9..78e4893a5 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -66,14 +66,9 @@ namespace Flow.Launcher.Plugin.Sys if (score > 0) { c.Score = score; + if (score == titleMatch.Score) - { c.TitleHighlightData = titleMatch.MatchData; - } - else - { - c.SubTitleHighlightData = subTitleMatch.MatchData; - } results.Add(c); } diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs index ca3b06b8d..3005567c4 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs @@ -54,7 +54,6 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper if (areaMatch.IsSearchPrecisionScoreMet()) { var settingResult = NewSettingResult(areaMatch.Score + midScore, entry.Type); - settingResult.SubTitleHighlightData = areaMatch.MatchData.Select(x => x + 6).ToList(); result = settingResult; } else