feat: warn when server and client versions differ during connection setup

This commit is contained in:
Stone_Red
2026-07-23 23:06:14 +02:00
committed by HueByte
parent 07996a78ed
commit 7eced63608
4 changed files with 36 additions and 4 deletions
+15
View File
@@ -1373,6 +1373,21 @@ public sealed class AppOrchestrator : IDisposable
_mainWindow.FocusInput();
FetchAndUpdateOnlineUsers();
});
if (result.ServerInfo is not null && !string.IsNullOrEmpty(result.ServerInfo.Version)
&& result.ServerInfo.Version != UpdateChecker.CurrentVersion)
{
InvokeUI(() => {
var choice = MessageBox.Query(_app, "Version Mismatch",
$"Server version {result.ServerInfo.Version} does not match client version {UpdateChecker.CurrentVersion}.\n\n" +
"Some features may not work correctly. Consider updating both to the same version.",
"Continue", "Disconnect");
if (choice == 1)
HandleDisconnect();
});
}
SaveServerToConfig(dialogResult);
}, "Connection failed", "Connect");
}