@@ -51,15 +51,15 @@ internal PluginsManager(PluginInitContext context, Settings settings)
5151
5252 private Task _downloadManifestTask = Task . CompletedTask ;
5353
54- internal Task UpdateManifestAsync ( bool silent = false )
54+ internal Task UpdateManifestAsync ( CancellationToken token = default , bool silent = false )
5555 {
5656 if ( _downloadManifestTask . Status == TaskStatus . Running )
5757 {
5858 return _downloadManifestTask ;
5959 }
6060 else
6161 {
62- _downloadManifestTask = PluginsManifest . UpdateManifestAsync ( ) ;
62+ _downloadManifestTask = PluginsManifest . UpdateManifestAsync ( token ) ;
6363 if ( ! silent )
6464 _downloadManifestTask . ContinueWith ( _ =>
6565 Context . API . ShowMsg ( Context . API . GetTranslation ( "plugin_pluginsmanager_update_failed_title" ) ,
@@ -181,9 +181,7 @@ internal async Task InstallOrUpdate(UserPlugin plugin)
181181
182182 internal async ValueTask < List < Result > > RequestUpdate ( string search , CancellationToken token )
183183 {
184- await UpdateManifestAsync ( ) ;
185-
186- token . ThrowIfCancellationRequested ( ) ;
184+ await UpdateManifestAsync ( token ) ;
187185
188186 var autocompletedResults = AutoCompleteReturnAllResults ( search ,
189187 Settings . HotkeyUpdate ,
@@ -368,9 +366,7 @@ private bool InstallSourceKnown(string url)
368366
369367 internal async ValueTask < List < Result > > RequestInstallOrUpdate ( string searchName , CancellationToken token )
370368 {
371- await UpdateManifestAsync ( ) ;
372-
373- token . ThrowIfCancellationRequested ( ) ;
369+ await UpdateManifestAsync ( token ) ;
374370
375371 var searchNameWithoutKeyword = searchName . Replace ( Settings . HotKeyInstall , string . Empty , StringComparison . OrdinalIgnoreCase ) . Trim ( ) ;
376372
0 commit comments