@@ -303,27 +303,23 @@ impl LogViewerApp {
303
303
ui. colored_label ( ui. visuals ( ) . error_fg_color , msg) ;
304
304
}
305
305
LoadingStatus :: Success ( data) => {
306
- self . loading_status =
307
- // TODO 1: Make a copy of the loading type desired and match on it to get the data to load
308
- match Data :: try_from ( ( & self . data_display_options , & data[ ..] ) ) {
309
- Ok ( mut data) => {
310
- if let Some ( old_data) = self . data . as_mut ( ) {
311
- // Preserve settings across loads of the data
312
- data. take_config (
313
- old_data,
314
- self . data_display_options . common_fields ( ) ,
315
- ) ;
316
- }
317
- self . data = Some ( data) ;
318
- if self . should_scroll_to_end_on_load {
319
- self . move_selected_last ( ) ;
320
- } else {
321
- self . should_scroll = true ;
322
- }
323
- LoadingStatus :: NotInProgress
306
+ self . loading_status = match Data :: try_from ( ( & self . data_display_options , & data[ ..] ) )
307
+ {
308
+ Ok ( mut data) => {
309
+ if let Some ( old_data) = self . data . as_mut ( ) {
310
+ // Preserve settings across loads of the data
311
+ data. take_config ( old_data, self . data_display_options . common_fields ( ) ) ;
324
312
}
325
- Err ( e) => LoadingStatus :: Failed ( clean_msg ( format ! ( "{e:?}" ) ) ) ,
313
+ self . data = Some ( data) ;
314
+ if self . should_scroll_to_end_on_load {
315
+ self . move_selected_last ( ) ;
316
+ } else {
317
+ self . should_scroll = true ;
318
+ }
319
+ LoadingStatus :: NotInProgress
326
320
}
321
+ Err ( e) => LoadingStatus :: Failed ( clean_msg ( format ! ( "{e:?}" ) ) ) ,
322
+ }
327
323
}
328
324
}
329
325
}
0 commit comments