web: change autoreload logic

This commit is contained in:
Bill Thiede 2025-03-12 13:53:11 -07:00
parent d791b4ce49
commit a6fffeafdc

View File

@ -594,12 +594,12 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
model.read_completion_ratio = ratio;
}
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!(
"Server ({}) and client ({}) version mismatch, reloading",
version, model.versions.client
);
#[cfg(not(debug_assertions))]
orders.send_msg(Msg::Reload);
}
model.versions.server = Some(version);