note edit: do not rename if new name didn't change
parent
2dc121ec49
commit
f70d7e8e7f
|
@ -110,13 +110,14 @@ class _NewNoteState extends State<NewNote> {
|
|||
if (_controller.text != "") {
|
||||
setState(() {
|
||||
Navigator.pop(context);
|
||||
print(_title);
|
||||
//Note: code repetition
|
||||
_changed = false;
|
||||
widget.storage.saveRename(_title, _controllerNote.text, _controller.text);
|
||||
_title = _controller.text;
|
||||
if(_title != _controller.text){
|
||||
_changed = false;
|
||||
widget.storage.saveRename(_title, _controllerNote.text, _controller.text);
|
||||
_title = _controller.text;
|
||||
|
||||
_controller.text = "";
|
||||
_controller.text = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue