mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
feat: warn when server and client versions differ during connection setup
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user