Compare commits

..

2 Commits

Author SHA1 Message Date
c62bac037f Reload page on refresh 2023-08-11 14:06:47 -07:00
79a57f3082 Address workspace lint 2023-08-11 13:55:39 -07:00
2 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,5 @@
[workspace] [workspace]
resolver = "2"
members = [ members = [
"web", "web",
"server", "server",

View File

@ -119,6 +119,9 @@ enum RefreshingState {
// `Msg` describes the different events you can modify state with. // `Msg` describes the different events you can modify state with.
enum Msg { enum Msg {
Noop, Noop,
// Tell the client to refresh its state
Reload,
// Tell the server to update state
RefreshStart, RefreshStart,
RefreshDone(Option<FetchError>), RefreshDone(Option<FetchError>),
SearchRequest { SearchRequest {
@ -149,6 +152,10 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
} else { } else {
RefreshingState::None RefreshingState::None
}; };
orders.perform_cmd(async move { Msg::Reload });
}
Msg::Reload => {
orders.perform_cmd(async move { on_url_changed(subs::UrlChanged(Url::current())) });
} }
Msg::SearchRequest { Msg::SearchRequest {