mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +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();
|
||||
}
|
||||
|
||||
enum DropDownChoices { Rename, DiscardChanges, Share }
|
||||
enum DropDownChoices { Rename, MoveToFolder, DiscardChanges, Share }
|
||||
|
||||
AppBar buildEditorAppBar(
|
||||
Editor editor,
|
||||
@ -58,6 +58,11 @@ AppBar buildEditorAppBar(
|
||||
editor.renameNoteSelected(note);
|
||||
return;
|
||||
|
||||
case DropDownChoices.MoveToFolder:
|
||||
var note = editorState.getNote();
|
||||
editor.moveNoteToFolderSelected(note);
|
||||
return;
|
||||
|
||||
case DropDownChoices.DiscardChanges:
|
||||
var note = editorState.getNote();
|
||||
editor.discardChangesSelected(note);
|
||||
@ -75,6 +80,10 @@ AppBar buildEditorAppBar(
|
||||
value: DropDownChoices.Rename,
|
||||
child: Text('Edit File Name'),
|
||||
),
|
||||
const PopupMenuItem<DropDownChoices>(
|
||||
value: DropDownChoices.MoveToFolder,
|
||||
child: Text('Move to Folder'),
|
||||
),
|
||||
const PopupMenuItem<DropDownChoices>(
|
||||
value: DropDownChoices.DiscardChanges,
|
||||
child: Text('Discard Changes'),
|
||||
|
Reference in New Issue
Block a user