diff --git a/lib/screens/folder_view.dart b/lib/screens/folder_view.dart index e3bab1db..a9edb768 100644 --- a/lib/screens/folder_view.dart +++ b/lib/screens/folder_view.dart @@ -42,6 +42,8 @@ class _FolderViewState extends State { StandardViewHeader _headerType = StandardViewHeader.TitleGenerated; bool _showSummary = true; + var _scaffoldKey = GlobalKey(); + @override void initState() { super.initState(); @@ -123,6 +125,7 @@ class _FolderViewState extends State { ); return Scaffold( + key: _scaffoldKey, appBar: AppBar( title: Text(title), leading: GJAppBarMenuButton(), @@ -205,7 +208,7 @@ class _FolderViewState extends State { } } - void _newPost(BuildContext context, EditorType editorType) { + void _newPost(BuildContext context, EditorType editorType) async { NotesFolderFS fsFolder = widget.notesFolder.fsFolder; if (widget.notesFolder.name != fsFolder.name) { var spec = Settings.instance.defaultNewNoteFolderSpec; @@ -224,7 +227,8 @@ class _FolderViewState extends State { var route = MaterialPageRoute( builder: (context) => NoteEditor.newNote(fsFolder, editorType), ); - Navigator.of(context).push(route); + await Navigator.of(context).push(route); + _scaffoldKey.currentState.removeCurrentSnackBar(); } RadioListTile _buildSortingTile(SortingMode sm) {