From 07b73db445581052a7f5858973af16ea058e7c03 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 25 Mar 2025 17:42:24 +0800 Subject: [PATCH] Add preview info for history results --- Flow.Launcher.Infrastructure/Constant.cs | 1 + Flow.Launcher/ViewModel/MainViewModel.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index c86ed4324..b4b2485c9 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -32,6 +32,7 @@ namespace Flow.Launcher.Infrastructure public static readonly string MissingImgIcon = Path.Combine(ImagesDirectory, "app_missing_img.png"); public static readonly string LoadingImgIcon = Path.Combine(ImagesDirectory, "loading.png"); public static readonly string ImageIcon = Path.Combine(ImagesDirectory, "image.png"); + public static readonly string HistoryIcon = Path.Combine(ImagesDirectory, "history.png"); public static string PythonPath; public static string NodePath; diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 905855d88..d2207be9e 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1075,6 +1075,11 @@ namespace Flow.Launcher.ViewModel Title = string.Format(title, h.Query), SubTitle = string.Format(time, h.ExecutedDateTime), IcoPath = "Images\\history.png", + Preview = new Result.PreviewInfo + { + PreviewImagePath = Constant.HistoryIcon, + Description = string.Format(time, h.ExecutedDateTime) + }, OriginQuery = new Query { RawQuery = h.Query }, Action = _ => {