Fix One Journal Entry Per Day

I wasn't handling the case when there is no journal entry for that day.
This commit is contained in:
Vishesh Handa
2020-09-21 10:17:35 +02:00
parent bcbdaf14f3
commit cc676f08d9

View File

@ -171,9 +171,9 @@ class _FolderViewState extends State<FolderView> {
var settings = Provider.of<Settings>(context);
if (editorType == EditorType.Journal) {
if (settings.journalEditorSingleNote) {
var note = await getTodayJournalEntry(fsFolder.rootFolder);
if (editorType == EditorType.Journal && settings.journalEditorSingleNote) {
var note = await getTodayJournalEntry(fsFolder.rootFolder);
if (note != null) {
return openNoteEditor(
context,
note,