Reload page on refresh
This commit is contained in:
parent
79a57f3082
commit
c62bac037f
@ -119,6 +119,9 @@ enum RefreshingState {
|
||||
// `Msg` describes the different events you can modify state with.
|
||||
enum Msg {
|
||||
Noop,
|
||||
// Tell the client to refresh its state
|
||||
Reload,
|
||||
// Tell the server to update state
|
||||
RefreshStart,
|
||||
RefreshDone(Option<FetchError>),
|
||||
SearchRequest {
|
||||
@ -149,6 +152,10 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
} else {
|
||||
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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user