diff --git a/apps/vault/src/main.rs b/apps/vault/src/main.rs index 79b916b74..f6f67cb7a 100644 --- a/apps/vault/src/main.rs +++ b/apps/vault/src/main.rs @@ -123,6 +123,8 @@ pub(crate) enum VaultOp { Redraw, /// ignore dirty rectangles and redraw everything FullRedraw, + /// reload the database (slow), and ignore dirty rectangles and redraw everything + ReloadDbAndFullRedraw, /// change focus ChangeFocus, @@ -411,6 +413,15 @@ fn main() -> ! { vaultux.redraw().expect("Vault couldn't redraw"); } } + Some(VaultOp::ReloadDbAndFullRedraw) => { + send_message(actions_conn, + Message::new_blocking_scalar(ActionOp::UpdateMode.to_usize().unwrap(), 0, 0, 0, 0) + ).ok(); + vaultux.update_mode(); + if allow_redraw { + vaultux.redraw().expect("Vault couldn't redraw"); + } + } Some(VaultOp::BasisChange) => { // this set of calls will effectively force a reload of any UX data *mode.lock().unwrap() = VaultMode::Fido; diff --git a/apps/vault/src/ux/fido.rs b/apps/vault/src/ux/fido.rs index e87620c1f..39d994672 100644 --- a/apps/vault/src/ux/fido.rs +++ b/apps/vault/src/ux/fido.rs @@ -503,12 +503,11 @@ pub(crate) fn start_fido_ux_thread(main_conn: xous::CID) { // force a redraw of the screen so the new record is rendered, // but for some reason this isn't working... - tt.sleep_ms(350).ok(); log::info!("sycing UI state..."); send_message( main_conn, Message::new_scalar( - crate::VaultOp::FullRedraw.to_usize().unwrap(), + crate::VaultOp::ReloadDbAndFullRedraw.to_usize().unwrap(), 0, 0, 0, 0) ).unwrap(); } else {