File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,12 +426,12 @@ pub struct ProviderDetailView {
426426}
427427
428428#[ derive( Clone ) ]
429- pub struct ProviderV2Entry {
429+ pub struct ProviderListEntry {
430430 pub provider : openshell_core:: proto:: Provider ,
431431 pub profile : Option < openshell_core:: proto:: ProviderProfile > ,
432432}
433433
434- impl ProviderV2Entry {
434+ impl ProviderListEntry {
435435 pub fn name ( & self ) -> & str {
436436 provider_name ( & self . provider )
437437 }
@@ -585,7 +585,7 @@ pub struct App {
585585
586586 // Provider list
587587 pub providers_v2_enabled : bool ,
588- pub provider_entries : Vec < ProviderV2Entry > ,
588+ pub provider_entries : Vec < ProviderListEntry > ,
589589 pub provider_names : Vec < String > ,
590590 pub provider_types : Vec < String > ,
591591 pub provider_cred_keys : Vec < String > ,
Original file line number Diff line number Diff line change @@ -2078,20 +2078,16 @@ async fn refresh_providers(app: &mut App) {
20782078 } ;
20792079
20802080 app. provider_count = providers. len ( ) ;
2081- app. provider_entries = if app. providers_v2_enabled {
2082- providers
2083- . iter ( )
2084- . cloned ( )
2085- . map ( |provider| app:: ProviderV2Entry {
2086- profile : profiles
2087- . get ( & ( provider. profile_workspace . clone ( ) , provider. r#type . clone ( ) ) )
2088- . cloned ( ) ,
2089- provider,
2090- } )
2091- . collect ( )
2092- } else {
2093- Vec :: new ( )
2094- } ;
2081+ app. provider_entries = providers
2082+ . iter ( )
2083+ . cloned ( )
2084+ . map ( |provider| app:: ProviderListEntry {
2085+ profile : profiles
2086+ . get ( & ( provider. profile_workspace . clone ( ) , provider. r#type . clone ( ) ) )
2087+ . cloned ( ) ,
2088+ provider,
2089+ } )
2090+ . collect ( ) ;
20952091 app. provider_names = providers
20962092 . iter ( )
20972093 . map ( |p| app:: provider_name ( p) . to_string ( ) )
You can’t perform that action at this time.
0 commit comments