Browse Source

neon: Fix cursor still doing stuff when note is updated

pull/118/head
jld3103 2 years ago
parent
commit
bb954f85f1
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 17
      packages/neon/lib/src/apps/notes/pages/note.dart

17
packages/neon/lib/src/apps/notes/pages/note.dart

@ -54,14 +54,21 @@ class _NotesNotePageState extends State<NotesNotePage> {
});
widget.bloc.content.listen((final content) {
final selection = _contentController.selection;
_contentController
..text = content
..selection = selection;
if (_contentController.text != content) {
final selection = _contentController.selection;
_contentController
..text = content
..selection = selection;
}
});
widget.bloc.title.listen((final title) {
_titleController.text = title;
if (_titleController.text != title) {
final selection = _titleController.selection;
_titleController
..text = title
..selection = selection;
}
});
_contentController.addListener(() => _updateController.add(null));

Loading…
Cancel
Save