From 7d6d0258d00d8e9ff0e920e098be939ba1058cbf Mon Sep 17 00:00:00 2001 From: TheBestPessimist Date: Sun, 5 Mar 2023 12:27:03 +0200 Subject: [PATCH] Add more debugging info to DEBUG profile --- .../Search/ResultManager.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index a463ac6fe..7c9213a70 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -70,7 +70,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search { return new Result { - Title = title, + Title = title + addScoreInDebug(score), IcoPath = path, SubTitle = subtitle, AutoCompleteText = GetAutoCompleteText(title, query, path, ResultType.Folder), @@ -207,7 +207,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search ? new Result.PreviewInfo { IsMedia = true, PreviewImagePath = filePath, } : Result.PreviewInfo.Default; - var title = Path.GetFileName(filePath); + var title = Path.GetFileName(filePath) + addScoreInDebug(score); var result = new Result { @@ -294,6 +294,15 @@ namespace Flow.Launcher.Plugin.Explorer.Search } } + private static string addScoreInDebug(int score) + { + #if DEBUG + return " ➡️ " + score; + #else + return ""; + #endif + } + public static readonly string[] MediaExtensions = { ".jpg", ".png", ".avi", ".mkv", ".bmp", ".gif", ".wmv", ".mp3", ".flac", ".mp4" }; }