fix UX update issue on FIDO adding records.

maybe need to also chase this down in the password add new area too?

need to check.
This commit is contained in:
bunnie 2022-09-23 00:37:15 +08:00
parent 278570d8d3
commit 72859d18dd
2 changed files with 12 additions and 2 deletions

View file

@ -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;

View file

@ -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 {