@@ -51,15 +51,15 @@ internal PluginsManager(PluginInitContext context, Settings settings)
51
51
52
52
private Task _downloadManifestTask = Task . CompletedTask ;
53
53
54
- internal Task UpdateManifestAsync ( bool silent = false )
54
+ internal Task UpdateManifestAsync ( CancellationToken token = default , bool silent = false )
55
55
{
56
56
if ( _downloadManifestTask . Status == TaskStatus . Running )
57
57
{
58
58
return _downloadManifestTask ;
59
59
}
60
60
else
61
61
{
62
- _downloadManifestTask = PluginsManifest . UpdateManifestAsync ( ) ;
62
+ _downloadManifestTask = PluginsManifest . UpdateManifestAsync ( token ) ;
63
63
if ( ! silent )
64
64
_downloadManifestTask . ContinueWith ( _ =>
65
65
Context . API . ShowMsg ( Context . API . GetTranslation ( "plugin_pluginsmanager_update_failed_title" ) ,
@@ -181,9 +181,7 @@ internal async Task InstallOrUpdate(UserPlugin plugin)
181
181
182
182
internal async ValueTask < List < Result > > RequestUpdate ( string search , CancellationToken token )
183
183
{
184
- await UpdateManifestAsync ( ) ;
185
-
186
- token . ThrowIfCancellationRequested ( ) ;
184
+ await UpdateManifestAsync ( token ) ;
187
185
188
186
var autocompletedResults = AutoCompleteReturnAllResults ( search ,
189
187
Settings . HotkeyUpdate ,
@@ -368,9 +366,7 @@ private bool InstallSourceKnown(string url)
368
366
369
367
internal async ValueTask < List < Result > > RequestInstallOrUpdate ( string searchName , CancellationToken token )
370
368
{
371
- await UpdateManifestAsync ( ) ;
372
-
373
- token . ThrowIfCancellationRequested ( ) ;
369
+ await UpdateManifestAsync ( token ) ;
374
370
375
371
var searchNameWithoutKeyword = searchName . Replace ( Settings . HotKeyInstall , string . Empty , StringComparison . OrdinalIgnoreCase ) . Trim ( ) ;
376
372
0 commit comments