mirror of https://github.com/gmbrax/Pilgrim.git
Add the auto-open option to the new_diary_modal.py
This commit is contained in:
parent
18760e174c
commit
f838a5b421
|
|
@ -62,7 +62,10 @@ class NewDiaryModal(ModalScreen[str]):
|
||||||
created_diary = await service.async_create(name)
|
created_diary = await service.async_create(name)
|
||||||
if created_diary:
|
if created_diary:
|
||||||
self.dismiss(name)
|
self.dismiss(name)
|
||||||
self.app.push_screen(EditEntryScreen(diary_id=created_diary.id))
|
|
||||||
|
if self.auto_open:
|
||||||
|
self.app.push_screen(EditEntryScreen(diary_id=created_diary.id))
|
||||||
|
|
||||||
self.notify(f"Diary: '{name}' created!")
|
self.notify(f"Diary: '{name}' created!")
|
||||||
else:
|
else:
|
||||||
self.notify("Error Creating the diary")
|
self.notify("Error Creating the diary")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue