File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Plugins/Flow.Launcher.Plugin.PluginManagement Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ private List<Result> ResultForInstallPlugin(Query query)
144
144
IcoPath = "Images\\ plugin.png" ,
145
145
TitleHighlightData = StringMatcher . FuzzySearch ( query . SecondSearch , r . name ) . MatchData ,
146
146
SubTitleHighlightData = StringMatcher . FuzzySearch ( query . SecondSearch , r . description ) . MatchData ,
147
- Action = c =>
147
+ Action = _ =>
148
148
{
149
149
MessageBoxResult result = MessageBox . Show ( "Are you sure you wish to install the \' " + r . name + "\' plugin" ,
150
150
"Install plugin" , MessageBoxButton . YesNo ) ;
@@ -157,17 +157,19 @@ private List<Result> ResultForInstallPlugin(Query query)
157
157
158
158
string pluginUrl = APIBASE + "/media/" + r1 . plugin_file ;
159
159
160
- try
160
+ Task . Run ( async ( ) =>
161
161
{
162
- Http . Download ( pluginUrl , filePath ) ;
163
- }
164
- catch ( WebException e )
165
- {
166
- context . API . ShowMsg ( $ "PluginManagement.ResultForInstallPlugin: download failed for <{ r . name } >") ;
167
- Log . Exception ( $ "|PluginManagement.ResultForInstallPlugin|download failed for <{ r . name } >", e ) ;
168
- return false ;
169
- }
170
- context . API . InstallPlugin ( filePath ) ;
162
+ try
163
+ {
164
+ await Http . Download ( pluginUrl , filePath ) ;
165
+ context . API . InstallPlugin ( filePath ) ;
166
+ }
167
+ catch ( WebException e )
168
+ {
169
+ context . API . ShowMsg ( $ "PluginManagement.ResultForInstallPlugin: download failed for <{ r . name } >") ;
170
+ Log . Exception ( $ "|PluginManagement.ResultForInstallPlugin|download failed for <{ r . name } >", e ) ;
171
+ }
172
+ } ) ;
171
173
}
172
174
return false ;
173
175
}
You can’t perform that action at this time.
0 commit comments