Skip to content

Commit ec99a36

Browse files
committed
Support badge path for result update interface
1 parent a1ce6b3 commit ec99a36

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,14 @@ public void RegisterResultsUpdatedEvent()
245245
// make a clone to avoid possible issue that plugin will also change the list and items when updating view model
246246
var resultsCopy = DeepCloneResults(e.Results, token);
247247

248+
foreach (var result in resultsCopy)
249+
{
250+
if (string.IsNullOrEmpty(result.BadgeIcoPath))
251+
{
252+
result.BadgeIcoPath = pair.Metadata.IcoPath;
253+
}
254+
}
255+
248256
PluginManager.UpdatePluginMetadata(resultsCopy, pair.Metadata, e.Query);
249257
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
250258
token)))

0 commit comments

Comments
 (0)