@@ -1329,7 +1329,7 @@ impl AudioHandler {
13291329
13301330 self . simple = Some ( Simple :: new (
13311331 None , // Use the default server
1332- & crate :: get_app_name ( ) , // Our application’ s name
1332+ & crate :: get_app_name ( ) , // Our application s name
13331333 Direction :: Playback , // We want a playback stream
13341334 None , // Use the default device
13351335 "playback" , // Description of our stream
@@ -1782,13 +1782,13 @@ impl LoginConfigHandler {
17821782 shared_password : Option < String > ,
17831783 conn_token : Option < String > ,
17841784 ) {
1785- let format_id = format_id ( id. as_str ( ) ) ;
1785+ let format_id = format_id ( id. as_str ( ) ) ;
17861786 let id = format_id. id ;
17871787 if format_id. force_relay {
1788- force_relay = true ;
1788+ force_relay = true ;
17891789 } ;
17901790 if format_id. server . is_some ( ) {
1791- self . other_server = format_id. server ;
1791+ self . other_server = format_id. server ;
17921792 }
17931793
17941794 self . id = id;
@@ -1948,13 +1948,24 @@ impl LoginConfigHandler {
19481948 ///
19491949 /// # Arguments
19501950 ///
1951- /// * `value` - The view style to be saved.
1951+ /// * `value` - The scroll style to be saved.
19521952 pub fn save_scroll_style ( & mut self , value : String ) {
19531953 let mut config = self . load_config ( ) ;
19541954 config. scroll_style = value;
19551955 self . save_config ( config) ;
19561956 }
19571957
1958+ /// Save edge scroll edge thickness to the current config.
1959+ ///
1960+ /// # Arguments
1961+ ///
1962+ /// * `value` - The edge thickness to be saved.
1963+ pub fn save_edge_scroll_edge_thickness ( & mut self , value : i32 ) {
1964+ let mut config = self . load_config ( ) ;
1965+ config. edge_scroll_edge_thickness = value;
1966+ self . save_config ( config) ;
1967+ }
1968+
19581969 /// Set a ui config of flutter for handler's [`PeerConfig`].
19591970 ///
19601971 /// # Arguments
@@ -3885,6 +3896,7 @@ async fn hc_connection_(
38853896 Ok ( ( ) )
38863897}
38873898
3899+
38883900#[ derive( Debug , Clone ) ]
38893901pub struct FormatId {
38903902 pub id : String ,
@@ -3934,6 +3946,7 @@ fn format_id(id: &str) -> FormatId {
39343946 }
39353947 }
39363948}
3949+
39373950pub mod peer_online {
39383951 use std:: collections:: HashMap ;
39393952
@@ -3943,7 +3956,7 @@ pub mod peer_online {
39433956 log,
39443957 rendezvous_proto:: * ,
39453958 sleep,
3946- socket_client:: { check_port, connect_tcp} ,
3959+ socket_client:: { check_port, connect_tcp} ,
39473960 ResultType , Stream ,
39483961 } ;
39493962
@@ -3957,7 +3970,7 @@ pub mod peer_online {
39573970 } else {
39583971 let query_timeout = std:: time:: Duration :: from_millis ( 3_000 ) ;
39593972 let ( rendezvous_server, _servers, _contained) =
3960- crate :: get_rendezvous_server ( READ_TIMEOUT ) . await ;
3973+ crate :: get_rendezvous_server ( READ_TIMEOUT ) . await ;
39613974
39623975 let group = ids
39633976 . iter ( )
@@ -4015,14 +4028,14 @@ pub mod peer_online {
40154028 }
40164029 Err ( e) => {
40174030 log:: debug!( "query onlines, {}" , & e) ;
4018- }
4031+ }
40194032 }
40204033 }
40214034 f ( onlines, offlines) ;
40224035 }
40234036 }
40244037
4025- async fn create_online_stream ( rendezvous_server : & str ) -> ResultType < Stream > {
4038+ async fn create_online_stream ( rendezvous_server : & str ) -> ResultType < Stream > {
40264039 let tmp = rendezvous_server. rfind ( ':' ) . map ( |pos| {
40274040 let url = & rendezvous_server[ ..pos] ;
40284041 let port: u16 = rendezvous_server[ pos + 1 ..] . parse ( ) . unwrap_or ( 0 ) ;
@@ -4037,6 +4050,7 @@ pub mod peer_online {
40374050 bail ! ( "Invalid server address: {}" , rendezvous_server) ;
40384051 }
40394052 }
4053+
40404054 }
40414055
40424056 async fn query_online_states_ (
@@ -4051,7 +4065,7 @@ pub mod peer_online {
40514065 ..Default :: default ( )
40524066 } ) ;
40534067
4054- let mut socket = match create_online_stream ( rendezvous_server) . await {
4068+ let mut socket = match create_online_stream ( rendezvous_server) . await {
40554069 Ok ( s) => s,
40564070 Err ( e) => {
40574071 log:: debug!( "Failed to create peers online stream, {e}" ) ;
0 commit comments