diff --git a/web/src/state.rs b/web/src/state.rs index e29045b..4506127 100644 --- a/web/src/state.rs +++ b/web/src/state.rs @@ -138,10 +138,13 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders) { } else { RefreshingState::None }; - orders.perform_cmd(async move { Msg::Reload }); + orders.perform_cmd(async move { Msg::Refresh }); + } + Msg::Refresh => { + orders.perform_cmd(async move { on_url_changed(subs::UrlChanged(Url::current())) }); } Msg::Reload => { - orders.perform_cmd(async move { on_url_changed(subs::UrlChanged(Url::current())) }); + window().location().reload(); } Msg::OnResize => (), @@ -590,6 +593,8 @@ pub enum RefreshingState { pub enum Msg { Noop, // Tell the client to refresh its state + Refresh, + // Tell the client to reload whole page from server Reload, // Window has changed size OnResize,