add basis cache clear on basis change callback as well

This commit is contained in:
bunnie 2023-01-04 04:15:44 +08:00
parent 57254ce47c
commit ec5435bd58
2 changed files with 7 additions and 0 deletions

View file

@ -450,6 +450,7 @@ fn main() -> ! {
}
}
Some(VaultOp::BasisChange) => {
vaultux.basis_change();
// this set of calls will effectively force a reload of any UX data
*mode.lock().unwrap() = VaultMode::Fido;
send_message(actions_conn,

View file

@ -204,6 +204,12 @@ impl VaultUx {
}
}
pub(crate) fn basis_change(&mut self) {
self.item_lists.lock().unwrap().pw.clear();
self.item_lists.lock().unwrap().fido.clear();
self.item_lists.lock().unwrap().totp.clear();
}
pub(crate) fn update_mode(&mut self) {
self.title_dirty = true;
self.filtered_list.clear();