File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ use self::types::{
6868 } ,
6969} ;
7070use crate :: api:: types:: chat_list:: { get_chat_list_item_by_id, ChatListItemFetchResult } ;
71- use crate :: api:: types:: login_param:: Transport ;
71+ use crate :: api:: types:: login_param:: TransportListEntry ;
7272use crate :: api:: types:: qr:: { QrObject , SecurejoinSource , SecurejoinUiPath } ;
7373
7474#[ derive( Debug ) ]
@@ -571,7 +571,7 @@ impl CommandApi {
571571 /// Returns the list of all email accounts that are used as a transport in the current profile.
572572 /// Use [Self::add_or_update_transport()] to add or change a transport
573573 /// and [Self::delete_transport()] to delete a transport.
574- async fn list_transports_ex ( & self , account_id : u32 ) -> Result < Vec < Transport > > {
574+ async fn list_transports_ex ( & self , account_id : u32 ) -> Result < Vec < TransportListEntry > > {
575575 let ctx = self . get_context ( account_id) . await ?;
576576 let res = ctx
577577 . list_transports ( )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use yerpc::TypeDef;
66
77#[ derive( Serialize , TypeDef , schemars:: JsonSchema ) ]
88#[ serde( rename_all = "camelCase" ) ]
9- pub struct Transport {
9+ pub struct TransportListEntry {
1010 /// The login data entered by the user.
1111 pub param : EnteredLoginParam ,
1212 /// Whether this transport is set to 'unpublished'.
@@ -66,9 +66,9 @@ pub struct EnteredLoginParam {
6666 pub oauth2 : Option < bool > ,
6767}
6868
69- impl From < dc:: Transport > for Transport {
70- fn from ( transport : dc:: Transport ) -> Self {
71- Transport {
69+ impl From < dc:: TransportListEntry > for TransportListEntry {
70+ fn from ( transport : dc:: TransportListEntry ) -> Self {
71+ TransportListEntry {
7272 param : transport. param . into ( ) ,
7373 is_unpublished : transport. is_unpublished ,
7474 }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ use crate::context::Context;
2929use crate :: imap:: Imap ;
3030use crate :: log:: warn;
3131pub use crate :: login_param:: EnteredLoginParam ;
32- use crate :: login_param:: { EnteredCertificateChecks , Transport } ;
32+ use crate :: login_param:: { EnteredCertificateChecks , TransportListEntry } ;
3333use crate :: message:: Message ;
3434use crate :: net:: proxy:: ProxyConfig ;
3535use crate :: oauth2:: get_oauth2_addr;
@@ -189,7 +189,7 @@ impl Context {
189189 /// Returns the list of all email accounts that are used as a transport in the current profile.
190190 /// Use [Self::add_or_update_transport()] to add or change a transport
191191 /// and [Self::delete_transport()] to delete a transport.
192- pub async fn list_transports ( & self ) -> Result < Vec < Transport > > {
192+ pub async fn list_transports ( & self ) -> Result < Vec < TransportListEntry > > {
193193 let transports = self
194194 . sql
195195 . query_map_vec (
@@ -199,7 +199,7 @@ impl Context {
199199 let param: String = row. get ( 0 ) ?;
200200 let param: EnteredLoginParam = serde_json:: from_str ( & param) ?;
201201 let is_published: bool = row. get ( 1 ) ?;
202- Ok ( Transport {
202+ Ok ( TransportListEntry {
203203 param,
204204 is_unpublished : !is_published,
205205 } )
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ pub struct EnteredServerLoginParam {
8181
8282/// A transport, as shown in the "relays" list in the UI.
8383#[ derive( Debug ) ]
84- pub struct Transport {
84+ pub struct TransportListEntry {
8585 /// The login data entered by the user.
8686 pub param : EnteredLoginParam ,
8787 /// Whether this transport is set to 'unpublished'.
You can’t perform that action at this time.
0 commit comments