web: change autoreload logic
This commit is contained in:
parent
d791b4ce49
commit
a6fffeafdc
@ -594,12 +594,12 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
model.read_completion_ratio = ratio;
|
model.read_completion_ratio = ratio;
|
||||||
}
|
}
|
||||||
Msg::UpdateServerVersion(version) => {
|
Msg::UpdateServerVersion(version) => {
|
||||||
if version != model.versions.client {
|
// Only git versions contain dash, don't autoreload there
|
||||||
|
if !version.contains('-') && version != model.versions.client {
|
||||||
warn!(
|
warn!(
|
||||||
"Server ({}) and client ({}) version mismatch, reloading",
|
"Server ({}) and client ({}) version mismatch, reloading",
|
||||||
version, model.versions.client
|
version, model.versions.client
|
||||||
);
|
);
|
||||||
#[cfg(not(debug_assertions))]
|
|
||||||
orders.send_msg(Msg::Reload);
|
orders.send_msg(Msg::Reload);
|
||||||
}
|
}
|
||||||
model.versions.server = Some(version);
|
model.versions.server = Some(version);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user