mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 19:36:25 +08:00
Editor: Bring back 'Move to Folder' in the dropdown menu
I cannot seem to position the BottomAppBar on top of the keyboard, and until I can do that lets keep this action over here. https://github.com/flutter/flutter/issues/26499
This commit is contained in:
@ -17,7 +17,7 @@ abstract class EditorState {
|
|||||||
Note getNote();
|
Note getNote();
|
||||||
}
|
}
|
||||||
|
|
||||||
enum DropDownChoices { Rename, DiscardChanges, Share }
|
enum DropDownChoices { Rename, MoveToFolder, DiscardChanges, Share }
|
||||||
|
|
||||||
AppBar buildEditorAppBar(
|
AppBar buildEditorAppBar(
|
||||||
Editor editor,
|
Editor editor,
|
||||||
@ -58,6 +58,11 @@ AppBar buildEditorAppBar(
|
|||||||
editor.renameNoteSelected(note);
|
editor.renameNoteSelected(note);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case DropDownChoices.MoveToFolder:
|
||||||
|
var note = editorState.getNote();
|
||||||
|
editor.moveNoteToFolderSelected(note);
|
||||||
|
return;
|
||||||
|
|
||||||
case DropDownChoices.DiscardChanges:
|
case DropDownChoices.DiscardChanges:
|
||||||
var note = editorState.getNote();
|
var note = editorState.getNote();
|
||||||
editor.discardChangesSelected(note);
|
editor.discardChangesSelected(note);
|
||||||
@ -75,6 +80,10 @@ AppBar buildEditorAppBar(
|
|||||||
value: DropDownChoices.Rename,
|
value: DropDownChoices.Rename,
|
||||||
child: Text('Edit File Name'),
|
child: Text('Edit File Name'),
|
||||||
),
|
),
|
||||||
|
const PopupMenuItem<DropDownChoices>(
|
||||||
|
value: DropDownChoices.MoveToFolder,
|
||||||
|
child: Text('Move to Folder'),
|
||||||
|
),
|
||||||
const PopupMenuItem<DropDownChoices>(
|
const PopupMenuItem<DropDownChoices>(
|
||||||
value: DropDownChoices.DiscardChanges,
|
value: DropDownChoices.DiscardChanges,
|
||||||
child: Text('Discard Changes'),
|
child: Text('Discard Changes'),
|
||||||
|
Reference in New Issue
Block a user