Fix the NewDiaryModal not accessing the toml file properly to set the auto_open flag

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda 2025-07-16 17:24:45 -03:00
parent 967c7e4ce6
commit a13c56a3a3
1 changed files with 2 additions and 2 deletions

View File

@ -12,9 +12,9 @@ class NewDiaryModal(ModalScreen[str]):
Binding("escape", "cancel", "Cancel"),
Binding("enter", "create_diary", "Create",priority=True),
]
def __init__(self,autoopen:bool = True):
def __init__(self):
super().__init__()
self.auto_open = autoopen
self.auto_open = self.app.config_manager.auto_open_new_diary
self.name_input = Input(id="NewDiaryModal-NameInput",classes="NewDiaryModal-NameInput") # This ID is fine, it's specific to the input
def compose(self) -> ComposeResult: