@@ -98,24 +98,27 @@ fn main() -> anyhow::Result<()> {
9898
9999 log_heap ( ) ;
100100
101- gui. state = "Initializing..." . to_string ( ) ;
102- gui. text = "Wait Loading Server URL..." . to_string ( ) ;
103- gui. display_flush ( ) . unwrap ( ) ;
101+ #[ cfg( feature = "extra_server" ) ]
102+ {
103+ gui. state = "Initializing..." . to_string ( ) ;
104+ gui. text = "Loading Server URL..." . to_string ( ) ;
105+ gui. display_flush ( ) . unwrap ( ) ;
104106
105- while let Some ( event) = evt_rx. blocking_recv ( ) {
106- if let app:: Event :: ServerUrl ( url) = event {
107- log:: info!( "Received ServerUrl event: {}" , url) ;
108- if !url. is_empty ( ) {
109- server_url = url;
107+ while let Some ( event) = evt_rx. blocking_recv ( ) {
108+ if let app:: Event :: ServerUrl ( url) = event {
109+ log:: info!( "Received ServerUrl event: {}" , url) ;
110+ if !url. is_empty ( ) {
111+ server_url = url;
112+ }
113+ break ;
110114 }
111- break ;
112115 }
113- }
114116
115- std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 500 ) ) ;
116- gui. text = format ! ( "Server URL: {}\n Continuing..." , server_url) ;
117- gui. display_flush ( ) . unwrap ( ) ;
118- std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 3000 ) ) ;
117+ std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 500 ) ) ;
118+ gui. text = format ! ( "Server URL: {}\n Continuing..." , server_url) ;
119+ gui. display_flush ( ) . unwrap ( ) ;
120+ std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 2000 ) ) ;
121+ }
119122
120123 let need_init = {
121124 button. is_low ( ) || state == 1 || ssid. is_empty ( ) || pass. is_empty ( ) || server_url. is_empty ( )
0 commit comments