Commit 51070b2 1 parent 454f109 commit 51070b2 Copy full SHA for 51070b2
File tree 2 files changed +5
-9
lines changed
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ live_design! {
37
37
loading = <ModelSelectorLoading > {
38
38
width: Fill ,
39
39
height: Fill ,
40
- visible: false ,
41
40
}
42
41
43
42
choose = <View > {
@@ -315,7 +314,7 @@ impl ModelSelector {
315
314
self . model_selector_loading ( id ! ( loading) )
316
315
. show_and_animate ( cx) ;
317
316
} else {
318
- self . model_selector_loading ( id ! ( loading) ) . hide ( cx ) ;
317
+ self . model_selector_loading ( id ! ( loading) ) . hide ( ) ;
319
318
}
320
319
}
321
320
@@ -358,7 +357,6 @@ impl ModelSelector {
358
357
let size = format_model_size ( & downloaded_file. file . size ) . unwrap_or ( "" . to_string ( ) ) ;
359
358
let size_visible = !size. trim ( ) . is_empty ( ) ;
360
359
361
- self . model_selector_loading ( id ! ( loading) ) . hide ( cx) ;
362
360
self . view ( id ! ( selected) ) . apply_over (
363
361
cx,
364
362
live ! {
Original file line number Diff line number Diff line change @@ -101,15 +101,13 @@ impl Widget for ModelSelectorLoading {
101
101
102
102
impl ModelSelectorLoading {
103
103
pub fn update_animation ( & mut self , cx : & mut Cx ) {
104
+ self . visible = true ;
104
105
if self . animator_in_state ( cx, id ! ( line. restart) ) {
105
- self . visible = true ;
106
106
self . animator_play ( cx, id ! ( line. run) ) ;
107
- self . timer = cx. start_timeout ( 1.5 ) ;
108
107
} else {
109
- self . visible = true ;
110
108
self . animator_play ( cx, id ! ( line. restart) ) ;
111
- self . timer = cx. start_timeout ( 1.5 ) ;
112
109
}
110
+ self . timer = cx. start_timeout ( 1.5 ) ;
113
111
}
114
112
}
115
113
@@ -123,11 +121,11 @@ impl ModelSelectorLoadingRef {
123
121
}
124
122
}
125
123
126
- pub fn hide ( & mut self , cx : & mut Cx ) {
124
+ pub fn hide ( & mut self ) {
127
125
let Some ( mut inner) = self . borrow_mut ( ) else {
128
126
return ;
129
127
} ;
130
- inner. view . visible = false ;
128
+ inner. visible = false ;
131
129
inner. timer = Timer :: default ( ) ;
132
130
}
133
131
}
You can’t perform that action at this time.
0 commit comments