File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
Plugins/Flow.Launcher.Plugin.PluginsManager Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Threading . Tasks ;
2
3
using System . Windows ;
3
4
using System . Windows . Input ;
4
5
using Flow . Launcher . Infrastructure . Logger ;
@@ -64,13 +65,18 @@ public void ReportProgress(double progress)
64
65
}
65
66
}
66
67
67
- private new void Close ( )
68
+ public async Task CloseAsync ( )
68
69
{
69
70
if ( ! Application . Current . Dispatcher . CheckAccess ( ) )
70
71
{
71
- Application . Current . Dispatcher . Invoke ( Close ) ;
72
+ await Application . Current . Dispatcher . InvokeAsync ( Close ) ;
72
73
}
73
74
75
+ Close ( ) ;
76
+ }
77
+
78
+ private new void Close ( )
79
+ {
74
80
if ( _isClosed )
75
81
{
76
82
return ;
Original file line number Diff line number Diff line change 1
- namespace Flow . Launcher . Plugin ;
1
+ using System . Threading . Tasks ;
2
+
3
+ namespace Flow . Launcher . Plugin ;
2
4
3
5
/// <summary>
4
6
/// Interface for progress box
@@ -16,5 +18,5 @@ public interface IProgressBoxEx
16
18
/// <summary>
17
19
/// Close progress box.
18
20
/// </summary>
19
- public void Close ( ) ;
21
+ public Task CloseAsync ( ) ;
20
22
}
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin)
196
196
if ( downloadCancelled )
197
197
return ;
198
198
else
199
- prgBox ? . Close ( ) ;
199
+ await prgBox ? . CloseAsync ( ) ;
200
200
}
201
201
else
202
202
{
@@ -217,7 +217,7 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin)
217
217
catch ( HttpRequestException e )
218
218
{
219
219
// force close progress box
220
- prgBox ? . Close ( ) ;
220
+ await prgBox ? . CloseAsync ( ) ;
221
221
222
222
// show error message
223
223
Context . API . ShowMsgError (
@@ -230,7 +230,7 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin)
230
230
catch ( Exception e )
231
231
{
232
232
// force close progress box
233
- prgBox ? . Close ( ) ;
233
+ await prgBox ? . CloseAsync ( ) ;
234
234
235
235
// show error message
236
236
Context . API . ShowMsgError ( Context . API . GetTranslation ( "plugin_pluginsmanager_install_error_title" ) ,
You can’t perform that action at this time.
0 commit comments