@@ -148,8 +148,8 @@ fn create_incognito_checkbox(
148
148
{
149
149
let incognito_checkbox = ControllerHost :: new (
150
150
Checkbox :: from_label ( Label :: new ( "In Incognito" ) . with_font ( FONT ) ) ,
151
- SaveRulesOnDataChange {
152
- save_rules_command : command1. clone ( ) ,
151
+ SubmitCommandOnDataChange {
152
+ command : command1. clone ( ) ,
153
153
} ,
154
154
)
155
155
. lens ( UIProfileAndIncognito :: incognito)
@@ -247,8 +247,8 @@ fn create_rule(browsers: &Arc<Vec<UIBrowser>>) -> impl Widget<UISettingsRule> {
247
247
//let value_text_box = ValueTextBox::new(text_box, formatter).update_data_while_editing(true);
248
248
let value_text_box = ControllerHost :: new (
249
249
text_box,
250
- SaveRulesOnDataChange {
251
- save_rules_command : SAVE_RULES . with ( ( ) ) ,
250
+ SubmitCommandOnDataChange {
251
+ command : SAVE_RULES . with ( ( ) ) ,
252
252
} ,
253
253
) ;
254
254
@@ -311,15 +311,15 @@ fn find_browser(browsers: &Arc<Vec<UIBrowser>>, unique_id: String) -> Option<&UI
311
311
return option;
312
312
}
313
313
314
- pub ( crate ) struct SaveRulesOnDataChange {
315
- pub ( crate ) save_rules_command : Command ,
314
+ pub ( crate ) struct SubmitCommandOnDataChange {
315
+ pub ( crate ) command : Command ,
316
316
}
317
317
318
- impl < T : Data , W : Widget < T > > Controller < T , W > for SaveRulesOnDataChange {
318
+ impl < T : Data , W : Widget < T > > Controller < T , W > for SubmitCommandOnDataChange {
319
319
fn update ( & mut self , child : & mut W , ctx : & mut UpdateCtx , old_data : & T , data : & T , env : & Env ) {
320
320
child. update ( ctx, old_data, data, env) ;
321
321
if !old_data. same ( data) {
322
- ctx. submit_command ( self . save_rules_command . clone ( ) ) ;
322
+ ctx. submit_command ( self . command . clone ( ) ) ;
323
323
}
324
324
}
325
325
}
0 commit comments