From f838a5b42132d76877df8080b02f1ae4e7be71bc Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Santos Souza de Miranda Date: Tue, 15 Jul 2025 15:51:30 -0300 Subject: [PATCH] Add the auto-open option to the new_diary_modal.py --- src/pilgrim/ui/screens/new_diary_modal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pilgrim/ui/screens/new_diary_modal.py b/src/pilgrim/ui/screens/new_diary_modal.py index 2238875..c98af64 100644 --- a/src/pilgrim/ui/screens/new_diary_modal.py +++ b/src/pilgrim/ui/screens/new_diary_modal.py @@ -62,7 +62,10 @@ class NewDiaryModal(ModalScreen[str]): created_diary = await service.async_create(name) if created_diary: 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!") else: self.notify("Error Creating the diary")