From ec99a365b9d27a708464b4506a41d55259c15961 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 11 Apr 2025 15:49:39 +0800 Subject: [PATCH] Support badge path for result update interface --- Flow.Launcher/ViewModel/MainViewModel.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index c1a237c6a..2155f7bf8 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -245,6 +245,14 @@ namespace Flow.Launcher.ViewModel // make a clone to avoid possible issue that plugin will also change the list and items when updating view model var resultsCopy = DeepCloneResults(e.Results, token); + foreach (var result in resultsCopy) + { + if (string.IsNullOrEmpty(result.BadgeIcoPath)) + { + result.BadgeIcoPath = pair.Metadata.IcoPath; + } + } + PluginManager.UpdatePluginMetadata(resultsCopy, pair.Metadata, e.Query); if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query, token)))