fix extra movement to the right

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-01-22 16:41:22 +03:00
parent b922aa75f7
commit 80fd07bcfe
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 8 additions and 2 deletions

View File

@ -160,7 +160,10 @@ impl Component for Validator {
fn update(&mut self, action: Action) -> Result<Option<Action>> {
match action {
Action::SetActiveScreen(Mode::Validator) => self.is_active = true,
Action::SetActiveScreen(Mode::Validator) => {
self.is_active = true;
self.current_tab = CurrentTab::StashInfo;
},
_ => {},
}
for component in self.components.iter_mut() {

View File

@ -191,7 +191,10 @@ impl Component for Wallet {
fn update(&mut self, action: Action) -> Result<Option<Action>> {
match action {
Action::SetActiveScreen(Mode::Wallet) => self.is_active = true,
Action::SetActiveScreen(Mode::Wallet) => {
self.is_active = true;
self.current_tab = CurrentTab::Accounts;
},
Action::UpdateAccountName(_) | Action::NewAccount(_) =>
self.current_tab = CurrentTab::Accounts,
Action::UpdateAddressBookRecord(_) | Action::NewAddressBookRecord(_, _) | Action::ClosePopup =>