Optimize Logic

This commit is contained in:
张弘韬 2021-01-17 18:46:08 +08:00
parent d203a7a5f3
commit 415adb72bf

View file

@ -279,15 +279,16 @@ namespace Flow.Launcher.Plugin.PluginsManager
internal async ValueTask<List<Result>> RequestInstallOrUpdate(string searchName, CancellationToken token)
{
if (!pluginsManifest.UserPlugins.Any() &&
_downloadManifestTask.IsCompleted ||
_downloadManifestTask.IsFaulted)
_downloadManifestTask.Status != TaskStatus.Running)
{
_downloadManifestTask = pluginsManifest.DownloadManifest();
}
await _downloadManifestTask;
if (token.IsCancellationRequested)
return null;
var searchNameWithoutKeyword = searchName.Replace(Settings.HotKeyInstall, string.Empty).Trim();
var results =