Skip to content
Snippets Groups Projects
Commit 5bcc6d30 authored by Jakub Ziebinski's avatar Jakub Ziebinski
Browse files

Extension of account name input by adding add_account_to_known method

parent f8cb080f
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !467. Comments created here will be created in the context of that merge request.
......@@ -186,10 +186,7 @@ class OperationActionBindings(CliveWidget, AbstractClassMessagePump):
account_inputs = self.query(AccountNameInput)
for account_input in account_inputs:
account_name = account_input.value_or_error
if not self.profile.accounts.is_account_known(account_name):
self.profile.accounts.known.add(account_name)
account_input.add_account_to_known()
def ensure_operations_list(self) -> list[OperationUnion]:
operation = self.create_operation()
......
......@@ -106,6 +106,12 @@ class AccountNameInput(TextInput):
self.input.validate_on = before
# <<< end workaround
def add_account_to_known(self) -> None:
account_name = self.value_or_error
if not self.profile.accounts.is_account_known(account_name):
self.profile.accounts.known.add(account_name)
def _update_account_status(self) -> None:
def handle_invalid_account_name() -> None:
self.input.border_subtitle = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment