@@ -43,17 +43,17 @@ class DesignDialogFormComponent extends UiStatefulComponent2<DesignDialogFormPro
4343 // their latest responses.
4444 @override
4545 Map getDerivedStateFromProps (Map nextPropsUntyped, Map prevStateUntyped) {
46- // new_props has the current dialog type, which we use to look up the React state (in particular
46+ // next_props has the current dialog type, which we use to look up the React state (in particular
4747 // the previous responses) the last time this type of Dialog was used.
48- var new_props = typedPropsFactory (nextPropsUntyped);
48+ var next_props = typedPropsFactory (nextPropsUntyped);
4949 var prev_state = typedStateFactory (prevStateUntyped);
50- if (new_props .dialog != null ) {
50+ if (next_props .dialog != null ) {
5151 // next if statement is true if the Dialog has just popped up,
5252 // OR if the dialog type changes (e.g., if the user has one dialog open and then opens another),
5353 // In either case, user hasn't typed any current responses for this dialog type yet,
54- // though some may be saved in TODO: saved where?
55- if (prev_state.current_responses == null || new_props .dialog! .type != prev_state.dialog_type) {
56- Dialog dialog = new_props .dialog! ;
54+ // though some may be saved in `prev_state.saved_responses`
55+ if (prev_state.current_responses == null || next_props .dialog! .type != prev_state.dialog_type) {
56+ Dialog dialog = next_props .dialog! ;
5757 assert (dialog.process_saved_response != null );
5858 var dialog_type = dialog.type;
5959 return newState ()
0 commit comments