Editors: Allow the title to be edited even when YAML is disabled

This commit is contained in:
Vishesh Handa
2020-07-29 16:27:15 +02:00
parent 9374c35901
commit 2ef2ccdf23
3 changed files with 6 additions and 7 deletions

View File

@ -177,7 +177,7 @@ class ChecklistEditorState extends State<ChecklistEditor>
parentFolder: widget.note.parent, parentFolder: widget.note.parent,
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
if (widget.note.canHaveMetadata) titleEditor, titleEditor,
Expanded(child: FocusScope(child: checklistWidget)), Expanded(child: FocusScope(child: checklistWidget)),
], ],
), ),

View File

@ -114,11 +114,10 @@ class MarkdownEditorState extends State<MarkdownEditor>
var editor = EditorScrollView( var editor = EditorScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
if (note.canHaveMetadata) NoteTitleEditor(
NoteTitleEditor( _titleTextController,
_titleTextController, _noteTextChanged,
_noteTextChanged, ),
),
NoteBodyEditor( NoteBodyEditor(
textController: _textController, textController: _textController,
autofocus: widget.isNewNote, autofocus: widget.isNewNote,

View File

@ -62,7 +62,7 @@ class NoteViewer extends StatelessWidget {
var view = EditorScrollView( var view = EditorScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
if (note.canHaveMetadata) NoteTitleHeader(note.title), NoteTitleHeader(note.title),
Padding( Padding(
padding: const EdgeInsets.only(top: 8.0, bottom: 8.0), padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),
child: MarkdownBody( child: MarkdownBody(