From 5165ce8f2a5d11f3b81f3feb37887e03f4c6677f Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:22:36 +0800 Subject: [PATCH 1/8] Add LoadImageAsync api function --- .../Image/ImageLoader.cs | 14 ++++++++------ Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 16 ++++++++++++++++ Flow.Launcher/PublicAPIInstance.cs | 4 ++++ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index 6f7b1cd90..4bd4c29c8 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -277,7 +277,7 @@ namespace Flow.Launcher.Infrastructure.Image return ImageCache.TryGetValue(path, loadFullImage, out image); } - public static async ValueTask LoadAsync(string path, bool loadFullImage = false) + public static async ValueTask LoadAsync(string path, bool loadFullImage = false, bool cacheImage = true) { var imageResult = await LoadInternalAsync(path, loadFullImage); @@ -293,16 +293,18 @@ namespace Flow.Launcher.Infrastructure.Image // image already exists img = ImageCache[key, loadFullImage] ?? img; } - else + else if (cacheImage) { - // new guid - + // save guid key GuidToKey[hash] = path; } } - // update cache - ImageCache[path, loadFullImage] = img; + if (cacheImage) + { + // update cache + ImageCache[path, loadFullImage] = img; + } } return img; diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index f178ebb90..fb80ede83 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -8,6 +8,7 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; using System.Windows; +using System.Windows.Media; namespace Flow.Launcher.Plugin { @@ -344,5 +345,20 @@ namespace Flow.Launcher.Plugin /// Stop the loading bar in main window /// public void StopLoadingBar(); + + /// + /// Load image from path. Support local, remote and data:image url. + /// If image path is missing, it will retun a missing icon. + /// + /// The path of the image. + /// + /// Load full image or not. + /// + /// + /// Cache the image or not. Cached image will be stored in FL cache. + /// If the image is just used one time, it's better to set this to false. + /// + /// + ValueTask LoadImageAsync(string path, bool loadFullImage = false, bool cacheImage = true); } } diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index e19ad2fdc..d12c6ac3e 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -10,6 +10,7 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; using System.Windows; +using System.Windows.Media; using CommunityToolkit.Mvvm.DependencyInjection; using Squirrel; using Flow.Launcher.Core; @@ -342,6 +343,9 @@ namespace Flow.Launcher public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync, Action cancelProgress = null) => ProgressBoxEx.ShowAsync(caption, reportProgressAsync, cancelProgress); + public ValueTask LoadImageAsync(string path, bool loadFullImage = false, bool cacheImage = true) => + ImageLoader.LoadAsync(path, loadFullImage, cacheImage); + #endregion #region Private Methods From f76110856fdc1c104d3dc1c5a888073b1ac3f413 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:25:06 +0800 Subject: [PATCH 2/8] Use api function in main project --- Flow.Launcher/MessageBoxEx.xaml.cs | 2 +- Flow.Launcher/Msg.xaml.cs | 6 +++--- Flow.Launcher/ViewModel/MainViewModel.cs | 2 +- Flow.Launcher/ViewModel/PluginViewModel.cs | 2 +- Flow.Launcher/ViewModel/ResultViewModel.cs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/MessageBoxEx.xaml.cs b/Flow.Launcher/MessageBoxEx.xaml.cs index e9b434fd9..3d94769d0 100644 --- a/Flow.Launcher/MessageBoxEx.xaml.cs +++ b/Flow.Launcher/MessageBoxEx.xaml.cs @@ -156,7 +156,7 @@ namespace Flow.Launcher private async Task SetImageAsync(string imageName) { var imagePath = Path.Combine(Constant.ProgramDirectory, "Images", imageName); - var imageSource = await ImageLoader.LoadAsync(imagePath); + var imageSource = await App.API.LoadImageAsync(imagePath); Img.Source = imageSource; } diff --git a/Flow.Launcher/Msg.xaml.cs b/Flow.Launcher/Msg.xaml.cs index 94184ff63..ff9accd62 100644 --- a/Flow.Launcher/Msg.xaml.cs +++ b/Flow.Launcher/Msg.xaml.cs @@ -43,7 +43,7 @@ namespace Flow.Launcher private async System.Threading.Tasks.Task LoadImageAsync() { - imgClose.Source = await ImageLoader.LoadAsync(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\close.png")); + imgClose.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\close.png")); } void imgClose_MouseUp(object sender, MouseButtonEventArgs e) @@ -71,11 +71,11 @@ namespace Flow.Launcher if (!File.Exists(iconPath)) { - imgIco.Source = await ImageLoader.LoadAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png")); + imgIco.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png")); } else { - imgIco.Source = await ImageLoader.LoadAsync(iconPath); + imgIco.Source = await App.API.LoadImageAsync(iconPath); } Show(); diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 17e4b55b7..bfa5bd504 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1168,7 +1168,7 @@ namespace Flow.Launcher.ViewModel else if (plugins.Count == 1) { PluginIconPath = plugins.Single().Metadata.IcoPath; - PluginIconSource = await ImageLoader.LoadAsync(PluginIconPath); + PluginIconSource = await App.API.LoadImageAsync(PluginIconPath); SearchIconVisibility = Visibility.Hidden; } else diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs index e91badb38..93a595de4 100644 --- a/Flow.Launcher/ViewModel/PluginViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginViewModel.cs @@ -45,7 +45,7 @@ namespace Flow.Launcher.ViewModel private async Task LoadIconAsync() { - Image = await ImageLoader.LoadAsync(PluginPair.Metadata.IcoPath); + Image = await App.API.LoadImageAsync(PluginPair.Metadata.IcoPath); OnPropertyChanged(nameof(Image)); } diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index db124e078..9aab71a32 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -199,7 +199,7 @@ namespace Flow.Launcher.ViewModel } } - return await ImageLoader.LoadAsync(imagePath, loadFullImage).ConfigureAwait(false); + return await App.API.LoadImageAsync(imagePath, loadFullImage).ConfigureAwait(false); } private async Task LoadImageAsync() From 4572068e768921e0834c53f6f4192c71ae762c04 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:25:28 +0800 Subject: [PATCH 3/8] Use api functions in plugin projects --- .../Views/PreviewPanel.xaml.cs | 3 +-- .../SearchSourceViewModel.cs | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs index 878832e4f..aaf1efdc1 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs @@ -7,7 +7,6 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Windows.Media.Imaging; -using Flow.Launcher.Infrastructure.Image; using Flow.Launcher.Plugin.Explorer.Search; namespace Flow.Launcher.Plugin.Explorer.Views; @@ -89,7 +88,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged private async Task LoadImageAsync() { - PreviewImage = await ImageLoader.LoadAsync(FilePath, true).ConfigureAwait(false); + PreviewImage = await Main.Context.API.LoadImageAsync(FilePath, true).ConfigureAwait(false); } public event PropertyChangedEventHandler? PropertyChanged; diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs index 9c5e81cb5..6554edd83 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs @@ -1,5 +1,4 @@ -using Flow.Launcher.Infrastructure.Image; -using System; +using System; using System.IO; using System.Threading.Tasks; #pragma warning disable IDE0005 @@ -41,8 +40,8 @@ namespace Flow.Launcher.Plugin.WebSearch #if DEBUG throw; #else - Main._context.API.ShowMsgBox(string.Format("Copying the selected image file to {0} has failed, changes will now be reverted", destinationFileNameFullPath)); - UpdateIconAttributes(selectedSearchSource, fullPathToOriginalImage); + Main._context.API.ShowMsgBox(string.Format("Copying the selected image file to {0} has failed, changes will now be reverted", destinationFileNameFullPath)); + UpdateIconAttributes(selectedSearchSource, fullPathToOriginalImage); #endif } } @@ -61,7 +60,7 @@ namespace Flow.Launcher.Plugin.WebSearch internal async ValueTask LoadPreviewIconAsync(string pathToPreviewIconImage) { - return await ImageLoader.LoadAsync(pathToPreviewIconImage); + return await Main._context.API.LoadImageAsync(pathToPreviewIconImage); } } } From 3de8005297fcba6e517ea674e3b2dc1129aea8e8 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:26:22 +0800 Subject: [PATCH 4/8] Improve WebSearch project code quality --- .../SuggestionSources/Baidu.cs | 8 +++----- .../SuggestionSources/Bing.cs | 16 +++++----------- .../SuggestionSources/DuckDuckGo.cs | 8 +++----- .../SuggestionSources/Google.cs | 8 +++----- 4 files changed, 14 insertions(+), 26 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs index 51f81b718..590666af7 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs @@ -4,8 +4,6 @@ using System.Linq; using System.Text.Json; using System.Text.RegularExpressions; using System.Threading.Tasks; -using Flow.Launcher.Infrastructure.Http; -using Flow.Launcher.Infrastructure.Logger; using System.Net.Http; using System.Threading; @@ -22,11 +20,11 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources try { const string api = "http://suggestion.baidu.com/su?json=1&wd="; - result = await Http.GetAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false); + result = await Main._context.API.HttpGetStringAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false); } catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException}) { - Log.Exception("|Baidu.Suggestions|Can't get suggestion from baidu", e); + Main._context.API.LogException(nameof(Baidu), "Can't get suggestion from baidu", e); return null; } @@ -41,7 +39,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources } catch (JsonException e) { - Log.Exception("|Baidu.Suggestions|can't parse suggestions", e); + Main._context.API.LogException(nameof(Baidu), "Can't parse suggestions", e); return new List(); } diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs index 640674243..938f7d387 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs @@ -1,6 +1,4 @@ -using Flow.Launcher.Infrastructure.Http; -using Flow.Launcher.Infrastructure.Logger; -using System; +using System; using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; @@ -10,16 +8,15 @@ using System.Threading; namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources { - class Bing : SuggestionSource + public class Bing : SuggestionSource { public override async Task> SuggestionsAsync(string query, CancellationToken token) { - try { const string api = "https://api.bing.com/qsonhs.aspx?q="; - await using var resultStream = await Http.GetStreamAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false); + await using var resultStream = await Main._context.API.HttpGetStreamAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false); using var json = (await JsonDocument.ParseAsync(resultStream, cancellationToken: token)); var root = json.RootElement.GetProperty("AS"); @@ -33,18 +30,15 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources .EnumerateArray() .Select(s => s.GetProperty("Txt").GetString())) .ToList(); - - - } catch (Exception e) when (e is HttpRequestException or { InnerException: TimeoutException }) { - Log.Exception("|Baidu.Suggestions|Can't get suggestion from baidu", e); + Main._context.API.LogException(nameof(Bing), "Can't get suggestion from baidu", e); return null; } catch (JsonException e) { - Log.Exception("|Bing.Suggestions|can't parse suggestions", e); + Main._context.API.LogException(nameof(Bing), "Can't parse suggestions", e); return new List(); } } diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs index 8fafb44cc..1d248caf3 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Flow.Launcher.Infrastructure.Http; -using Flow.Launcher.Infrastructure.Logger; using System.Net.Http; using System.Threading; using System.Text.Json; @@ -25,7 +23,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources { const string api = "https://duckduckgo.com/ac/?type=list&q="; - await using var resultStream = await Http.GetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false); + await using var resultStream = await Main._context.API.HttpGetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false); using var json = await JsonDocument.ParseAsync(resultStream, cancellationToken: token); @@ -36,12 +34,12 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources } catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException}) { - Log.Exception("|DuckDuckGo.Suggestions|Can't get suggestion from DuckDuckGo", e); + Main._context.API.LogException(nameof(DuckDuckGo), "Can't get suggestion from DuckDuckGo", e); return null; } catch (JsonException e) { - Log.Exception("|DuckDuckGo.Suggestions|can't parse suggestions", e); + Main._context.API.LogException(nameof(DuckDuckGo), "Can't parse suggestions", e); return new List(); } } diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs index 265de4a98..5f2504009 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Flow.Launcher.Infrastructure.Http; -using Flow.Launcher.Infrastructure.Logger; using System.Net.Http; using System.Threading; using System.Text.Json; @@ -18,7 +16,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources { const string api = "https://www.google.com/complete/search?output=chrome&q="; - await using var resultStream = await Http.GetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false); + await using var resultStream = await Main._context.API.HttpGetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false); using var json = await JsonDocument.ParseAsync(resultStream, cancellationToken: token); @@ -29,12 +27,12 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources } catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException}) { - Log.Exception("|Baidu.Suggestions|Can't get suggestion from baidu", e); + Main._context.API.LogException(nameof(Google), "Can't get suggestion from baidu", e); return null; } catch (JsonException e) { - Log.Exception("|Google.Suggestions|can't parse suggestions", e); + Main._context.API.LogException(nameof(Google), "Can't parse suggestions", e); return new List(); } } From f9a01e10025563e069c3caafce85b80e89d60d2f Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:34:04 +0800 Subject: [PATCH 5/8] Fix typos Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index fb80ede83..0ee576b2e 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -348,7 +348,7 @@ namespace Flow.Launcher.Plugin /// /// Load image from path. Support local, remote and data:image url. - /// If image path is missing, it will retun a missing icon. + /// If image path is missing, it will return a missing icon. /// /// The path of the image. /// From 15a7e3a5afd8af4a9139935fd376d963963fb66b Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:35:03 +0800 Subject: [PATCH 6/8] Fix log typos Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs index 938f7d387..9efc36263 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs @@ -33,7 +33,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources } catch (Exception e) when (e is HttpRequestException or { InnerException: TimeoutException }) { - Main._context.API.LogException(nameof(Bing), "Can't get suggestion from baidu", e); + Main._context.API.LogException(nameof(Bing), "Can't get suggestion from Bing", e); return null; } catch (JsonException e) From a33ecdbb971869605c4e8c03b5a0a00465040bd4 Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:35:27 +0800 Subject: [PATCH 7/8] Fix log typos Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs index 5f2504009..ad8fb508f 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs @@ -27,7 +27,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources } catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException}) { - Main._context.API.LogException(nameof(Google), "Can't get suggestion from baidu", e); + Main._context.API.LogException(nameof(Google), "Can't get suggestion from Google", e); return null; } catch (JsonException e) From e6a8fe3523b7c810faebf2b2235e1322884c0696 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 2 Apr 2025 18:36:25 +0800 Subject: [PATCH 8/8] Use caption letter --- .../Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs index 590666af7..65be06b53 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs @@ -24,7 +24,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources } catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException}) { - Main._context.API.LogException(nameof(Baidu), "Can't get suggestion from baidu", e); + Main._context.API.LogException(nameof(Baidu), "Can't get suggestion from Baidu", e); return null; }