Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,29 @@ public Control CreateSettingPanel()
return new PluginsManagerSettings(viewModel);
}

public async Task InitAsync(PluginInitContext context)
public Task InitAsync(PluginInitContext context)
{
Context = context;
viewModel = new SettingsViewModel(context);
Settings = viewModel.Settings;
contextMenu = new ContextMenu(Context);
pluginManager = new PluginsManager(Context, Settings);
var updateManifestTask = pluginManager.UpdateManifest();
if (await Task.WhenAny(updateManifestTask, Task.Delay(500)) == updateManifestTask)
_ = updateManifestTask.ContinueWith(t =>
{
lastUpdateTime = DateTime.Now;
}
else
{
context.API.ShowMsg("Plugin Manifest Download Fail.",
@"Please check internet transmission with Github.com.
You may not be able to Install and Update Plugin.", pluginManager.icoPath);
}
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 Task.CompletedTask;
}

public List<Result> LoadContextMenus(Result selectedResult)
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Name": "Plugins Manager",
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
"Author": "Jeremy Wu",
"Version": "1.6.0",
"Version": "1.6.1",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",
Expand Down