@@ -98,8 +98,9 @@ pub fn update_tab_thread(
9898 msg_sender : MsgSender ,
9999) {
100100 let is_running = ArcBool :: new_with ( true ) ;
101+ let mut app_started = false ;
101102 thread:: scope ( |scope| {
102- scope. spawn ( |_| wait_for_device_settings ( is_running. clone ( ) , sender . clone ( ) , update_tab_context. clone ( ) , shared_state. clone ( ) ) ) ;
103+ scope. spawn ( |_| wait_for_device_settings ( is_running. clone ( ) , update_tab_context. clone ( ) , shared_state. clone ( ) ) ) ;
103104 scope
104105 . spawn ( |inner_scope| {
105106 sender. send ( Some ( UpdateTabUpdate :: new ( ) ) ) . unwrap ( ) ;
@@ -113,8 +114,10 @@ pub fn update_tab_thread(
113114 // Check for path updates.
114115 if let Some ( fw_dir) = update. firmware_directory {
115116 update_tab_context. set_firmware_directory( fw_dir. clone( ) ) ;
116- update_tab_context
117- . set_firmware_local_filepath( check_for_firmware_local_filepath( fw_dir) ) ;
117+ if app_started {
118+ update_tab_context. set_firmware_local_filepath( check_for_firmware_local_filepath( fw_dir) ) ;
119+ }
120+ app_started = true ;
118121 }
119122 if let Some ( fw_local_filepath) = update. firmware_local_filepath {
120123 if let Some ( parent_path) = fw_local_filepath. parent( ) {
@@ -184,7 +187,6 @@ pub fn update_tab_thread(
184187
185188fn wait_for_device_settings (
186189 is_running : ArcBool ,
187- sender : Sender < Option < UpdateTabUpdate > > ,
188190 update_tab_context : UpdateTabContext ,
189191 shared_state : SharedState ,
190192) -> Result < ( ) > {
@@ -193,11 +195,7 @@ fn wait_for_device_settings(
193195 update_tab_context. set_current_firmware_version ( firmware_version) ;
194196 check_console_outdated ( update_tab_context. clone ( ) ) ?;
195197 check_firmware_outdated ( update_tab_context. clone ( ) ) ?;
196- check_above_v2 ( update_tab_context. clone ( ) ) ?;
197- sender. send ( Some ( UpdateTabUpdate {
198- firmware_directory : Some ( update_tab_context. firmware_directory ( ) ) ,
199- ..Default :: default ( )
200- } ) ) ?;
198+ check_above_v2 ( update_tab_context) ?;
201199 break ;
202200 }
203201 std:: thread:: sleep ( Duration :: from_millis ( WAIT_FOR_SETTINGS_THREAD_SLEEP_MS ) ) ;
0 commit comments