|
|
@ -41,10 +41,9 @@ class _NotesNotePageState extends State<NotesNotePage> { |
|
|
|
_contentController.addListener(() => _contentStreamController.add(_contentController.text)); |
|
|
|
_contentController.addListener(() => _contentStreamController.add(_contentController.text)); |
|
|
|
_titleController.addListener(() => _titleStreamController.add(_titleController.text)); |
|
|
|
_titleController.addListener(() => _titleStreamController.add(_titleController.text)); |
|
|
|
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((final _) async { |
|
|
|
WidgetsBinding.instance.addPostFrameCallback((final _) { |
|
|
|
if (Provider.of<NeonPlatform>(context, listen: false).canUseWakelock) { |
|
|
|
unawaited(WakelockPlus.enable()); |
|
|
|
await Wakelock.enable(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (widget.bloc.options.defaultNoteViewTypeOption.value == DefaultNoteViewType.edit || |
|
|
|
if (widget.bloc.options.defaultNoteViewTypeOption.value == DefaultNoteViewType.edit || |
|
|
|
widget.bloc.initialContent.isEmpty) { |
|
|
|
widget.bloc.initialContent.isEmpty) { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -65,9 +64,8 @@ class _NotesNotePageState extends State<NotesNotePage> { |
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(final BuildContext context) => BackButtonListener( |
|
|
|
Widget build(final BuildContext context) => BackButtonListener( |
|
|
|
onBackButtonPressed: () async { |
|
|
|
onBackButtonPressed: () async { |
|
|
|
if (Provider.of<NeonPlatform>(context, listen: false).canUseWakelock) { |
|
|
|
unawaited(WakelockPlus.disable()); |
|
|
|
await Wakelock.disable(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Scaffold( |
|
|
|
child: Scaffold( |
|
|
|