mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Don't await download manifest when it is unavaliable, but only await when calling install method to allow user using uninstall when manifest is not ready.
This commit is contained in:
parent
267c796ad8
commit
5d894ec154
2 changed files with 15 additions and 4 deletions
|
|
@ -69,8 +69,19 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
|
||||
if ((DateTime.Now - lastUpdateTime).TotalHours > 12) // 12 hours
|
||||
{
|
||||
await pluginManager.UpdateManifest();
|
||||
lastUpdateTime = DateTime.Now;
|
||||
_ = pluginManager.UpdateManifest().ContinueWith(t =>
|
||||
{
|
||||
if (t.IsCompletedSuccessfully)
|
||||
{
|
||||
lastUpdateTime = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
Context.API.ShowMsg("Plugin Manifest Download Fail.",
|
||||
"Please check if you can connect to github.com. " +
|
||||
"This error means you may not be able to Install and Update Plugin.", pluginManager.icoPath, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return search switch
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
Settings = settings;
|
||||
}
|
||||
|
||||
internal async Task UpdateManifest()
|
||||
internal Task UpdateManifest()
|
||||
{
|
||||
await pluginsManifest.DownloadManifest();
|
||||
return _downloadManifestTask = pluginsManifest.DownloadManifest();
|
||||
}
|
||||
|
||||
internal List<Result> GetDefaultHotKeys()
|
||||
|
|
|
|||
Loading…
Reference in a new issue