mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Optimize exception message logic
This commit is contained in:
parent
89453f441d
commit
2271ec16fd
2 changed files with 7 additions and 12 deletions
|
|
@ -71,17 +71,8 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
{
|
||||
_ = 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);
|
||||
}
|
||||
});
|
||||
lastUpdateTime = DateTime.Now;
|
||||
}, TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
}
|
||||
|
||||
return search switch
|
||||
|
|
|
|||
|
|
@ -48,7 +48,11 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
|
||||
internal Task UpdateManifest()
|
||||
{
|
||||
return _downloadManifestTask = pluginsManifest.DownloadManifest();
|
||||
return _downloadManifestTask = pluginsManifest.DownloadManifest().ContinueWith(t =>
|
||||
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.", icoPath, false),
|
||||
TaskContinuationOptions.OnlyOnFaulted);
|
||||
}
|
||||
|
||||
internal List<Result> GetDefaultHotKeys()
|
||||
|
|
|
|||
Loading…
Reference in a new issue