@@ -30,24 +30,29 @@ public Control CreateSettingPanel()
30
30
return new PluginsManagerSettings ( viewModel ) ;
31
31
}
32
32
33
- public async Task InitAsync ( PluginInitContext context )
33
+ public Task InitAsync ( PluginInitContext context )
34
34
{
35
35
Context = context ;
36
36
viewModel = new SettingsViewModel ( context ) ;
37
37
Settings = viewModel . Settings ;
38
38
contextMenu = new ContextMenu ( Context ) ;
39
39
pluginManager = new PluginsManager ( Context , Settings ) ;
40
40
var updateManifestTask = pluginManager . UpdateManifest ( ) ;
41
- if ( await Task . WhenAny ( updateManifestTask , Task . Delay ( 500 ) ) == updateManifestTask )
41
+ _ = updateManifestTask . ContinueWith ( t =>
42
42
{
43
- lastUpdateTime = DateTime . Now ;
44
- }
45
- else
46
- {
47
- context . API . ShowMsg ( "Plugin Manifest Download Fail." ,
48
- @"Please check internet transmission with Github.com.
49
- You may not be able to Install and Update Plugin." , pluginManager . icoPath ) ;
50
- }
43
+ if ( t . IsCompletedSuccessfully )
44
+ {
45
+ lastUpdateTime = DateTime . Now ;
46
+ }
47
+ else
48
+ {
49
+ context . API . ShowMsg ( "Plugin Manifest Download Fail." ,
50
+ "Please check if you can connect to github.com. " +
51
+ "This error means you may not be able to Install and Update Plugin." , pluginManager . icoPath , false ) ;
52
+ }
53
+ } ) ;
54
+
55
+ return Task . CompletedTask ;
51
56
}
52
57
53
58
public List < Result > LoadContextMenus ( Result selectedResult )
0 commit comments