@@ -186,16 +186,6 @@ internal async ValueTask<List<Result>> RequestUpdate(string search, Cancellation
186186 {
187187 await UpdateManifestAsync ( token ) ;
188188
189- var autocompletedResults = AutoCompleteReturnAllResults ( search ,
190- Settings . HotkeyUpdate ,
191- "Update" ,
192- "Select a plugin to update" ) ;
193-
194- if ( autocompletedResults . Any ( ) )
195- return autocompletedResults ;
196-
197- var uninstallSearch = search . Replace ( Settings . HotkeyUpdate , string . Empty , StringComparison . OrdinalIgnoreCase ) . TrimStart ( ) ;
198-
199189 var resultsForUpdate =
200190 from existingPlugin in Context . API . GetAllPlugins ( )
201191 join pluginFromManifest in PluginsManifest . UserPlugins
@@ -283,7 +273,7 @@ await Http.DownloadAsync(x.PluginNewUserPlugin.UrlDownload, downloadToFilePath)
283273 }
284274 } ) ;
285275
286- return Search ( results , uninstallSearch ) ;
276+ return Search ( results , search ) ;
287277 }
288278
289279 internal bool PluginExists ( string id )
@@ -367,15 +357,13 @@ private bool InstallSourceKnown(string url)
367357 return url . StartsWith ( acceptedSource ) && Context . API . GetAllPlugins ( ) . Any ( x => x . Metadata . Website . StartsWith ( contructedUrlPart ) ) ;
368358 }
369359
370- internal async ValueTask < List < Result > > RequestInstallOrUpdate ( string searchName , CancellationToken token )
360+ internal async ValueTask < List < Result > > RequestInstallOrUpdate ( string search , CancellationToken token )
371361 {
372362 await UpdateManifestAsync ( token ) ;
373363
374- var searchNameWithoutKeyword = searchName . Replace ( Settings . HotKeyInstall , string . Empty , StringComparison . OrdinalIgnoreCase ) . Trim ( ) ;
375-
376- if ( Uri . IsWellFormedUriString ( searchNameWithoutKeyword , UriKind . Absolute )
377- && searchNameWithoutKeyword . Split ( '.' ) . Last ( ) == zip )
378- return InstallFromWeb ( searchNameWithoutKeyword ) ;
364+ if ( Uri . IsWellFormedUriString ( search , UriKind . Absolute )
365+ && search . Split ( '.' ) . Last ( ) == zip )
366+ return InstallFromWeb ( search ) ;
379367
380368 var results =
381369 PluginsManifest
@@ -401,7 +389,7 @@ internal async ValueTask<List<Result>> RequestInstallOrUpdate(string searchName,
401389 ContextData = x
402390 } ) ;
403391
404- return Search ( results , searchNameWithoutKeyword ) ;
392+ return Search ( results , search ) ;
405393 }
406394
407395 private void Install ( UserPlugin plugin , string downloadedFilePath )
@@ -461,16 +449,6 @@ private void Install(UserPlugin plugin, string downloadedFilePath)
461449
462450 internal List < Result > RequestUninstall ( string search )
463451 {
464- var autocompletedResults = AutoCompleteReturnAllResults ( search ,
465- Settings . HotkeyUninstall ,
466- "Uninstall" ,
467- "Select a plugin to uninstall" ) ;
468-
469- if ( autocompletedResults . Any ( ) )
470- return autocompletedResults ;
471-
472- var uninstallSearch = search . Replace ( Settings . HotkeyUninstall , string . Empty , StringComparison . OrdinalIgnoreCase ) . TrimStart ( ) ;
473-
474452 var results = Context . API
475453 . GetAllPlugins ( )
476454 . Select ( x =>
@@ -501,7 +479,7 @@ internal List<Result> RequestUninstall(string search)
501479 }
502480 } ) ;
503481
504- return Search ( results , uninstallSearch ) ;
482+ return Search ( results , search ) ;
505483 }
506484
507485 private void Uninstall ( PluginMetadata plugin , bool removedSetting = true )
@@ -516,36 +494,6 @@ private void Uninstall(PluginMetadata plugin, bool removedSetting = true)
516494 using var _ = File . CreateText ( Path . Combine ( plugin . PluginDirectory , "NeedDelete.txt" ) ) ;
517495 }
518496
519- private List < Result > AutoCompleteReturnAllResults ( string search , string hotkey , string title , string subtitle )
520- {
521- if ( ! string . IsNullOrEmpty ( search )
522- && hotkey . StartsWith ( search )
523- && ( hotkey != search || ! search . StartsWith ( hotkey ) ) )
524- {
525- return
526- new List < Result >
527- {
528- new Result
529- {
530- Title = title ,
531- IcoPath = icoPath ,
532- SubTitle = subtitle ,
533- Action = e =>
534- {
535- Context
536- . API
537- . ChangeQuery (
538- $ "{ Context . CurrentPluginMetadata . ActionKeywords . FirstOrDefault ( ) } { hotkey } ") ;
539-
540- return false ;
541- }
542- }
543- } ;
544- }
545-
546- return new List < Result > ( ) ;
547- }
548-
549497 private bool SameOrLesserPluginVersionExists ( string metadataPath )
550498 {
551499 var newMetadata = JsonSerializer . Deserialize < PluginMetadata > ( File . ReadAllText ( metadataPath ) ) ;
0 commit comments