diff --git a/web/src/state.rs b/web/src/state.rs index 9327935..45ddad9 100644 --- a/web/src/state.rs +++ b/web/src/state.rs @@ -292,12 +292,16 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders) { ) }); } - Msg::FrontPageResult(Err(e)) => error!("error FrontPageResult: {e:?}"), + Msg::FrontPageResult(Err(e)) => { + orders.send_msg(Msg::Reload); + error!("error FrontPageResult: {e:?}"); + } Msg::FrontPageResult(Ok(graphql_client::Response { data: None, errors: None, .. })) => { + orders.send_msg(Msg::Reload); error!("FrontPageResult no data or errors, should not happen"); } Msg::FrontPageResult(Ok(graphql_client::Response { @@ -305,6 +309,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders) { errors: Some(e), .. })) => { + orders.send_msg(Msg::Reload); error!("FrontPageResult error: {e:?}"); } Msg::FrontPageResult(Ok(graphql_client::Response { @@ -400,6 +405,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders) { orders.send_msg(Msg::WindowScrolled); } Msg::ShowThreadResult(bad) => { + orders.send_msg(Msg::Reload); error!("show_thread_query error: {bad:#?}"); } Msg::CatchupRequest { query } => { @@ -432,6 +438,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders) { } } Msg::CatchupResult(bad) => { + orders.send_msg(Msg::Reload); error!("catchup_query error: {bad:#?}"); } Msg::SelectionSetNone => {