fix deletion UX in vault

This commit is contained in:
bunnie 2023-01-20 02:00:35 +08:00
parent 329569803d
commit d811ef0d2e
2 changed files with 4 additions and 1 deletions

View file

@ -511,6 +511,9 @@ impl<'a> ActionManager<'a> {
Ok(_) => self.modals.show_notification(t!("vault.completed", xous::LANG), None).ok().unwrap(),
Err(e) => self.report_err(t!("vault.error.internal_error", xous::LANG), Some(e)),
}
if entry.mode == VaultMode::Password {
self.item_lists.lock().unwrap().pw.remove(entry.key_name.as_str().unwrap_or("UTF-8 error"));
}
}
}
}

View file

@ -36,7 +36,7 @@ impl ListItem {
}
}
pub fn key(&self) -> String {
self.name.to_string() + &self.guid.to_string()
self.guid.to_string()
}
}
impl Ord for ListItem {