diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndexSearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndexSearchManager.cs index c3a7d9e91..3d69a1ee6 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndexSearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndexSearchManager.cs @@ -82,14 +82,17 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex return HandledEngineNotAvailableExceptionAsync(); } } + public IAsyncEnumerable SearchAsync(string search, CancellationToken token) { return WindowsIndexFilesAndFoldersSearchAsync(search, token: token); } + public IAsyncEnumerable ContentSearchAsync(string plainSearch, string contentSearch, CancellationToken token) { return WindowsIndexFileContentSearchAsync(contentSearch, token); } + public IAsyncEnumerable EnumerateAsync(string path, string search, bool recursive, CancellationToken token) { return WindowsIndexTopLevelFolderSearchAsync(search, path, recursive, token); @@ -100,19 +103,17 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex if (!Settings.WarnWindowsSearchServiceOff) return AsyncEnumerable.Empty(); - var api = Main.Context.API; - throw new EngineNotAvailableException( "Windows Index", - api.GetTranslation("plugin_explorer_windowsSearchServiceFix"), - api.GetTranslation("plugin_explorer_windowsSearchServiceNotRunning"), + Main.Context.API.GetTranslation("plugin_explorer_windowsSearchServiceFix"), + Main.Context.API.GetTranslation("plugin_explorer_windowsSearchServiceNotRunning"), Constants.WindowsIndexErrorImagePath, c => { Settings.WarnWindowsSearchServiceOff = false; // Clears the warning message so user is not mistaken that it has not worked - api.ChangeQuery(string.Empty); + Main.Context.API.ChangeQuery(string.Empty); return ValueTask.FromResult(false); });