feat: implement background update check and add version notification in AppOrchestrator

This commit is contained in:
HueByte
2026-02-19 18:22:33 +01:00
parent b4c3ebd254
commit baebc093f5
3 changed files with 82 additions and 9 deletions
+12
View File
@@ -414,6 +414,18 @@ public sealed class AppOrchestrator : IDisposable
FetchAndUpdateOnlineUsers();
SaveServerToConfig(result);
// Check for newer version in the background
_ = Task.Run(async () =>
{
var newVersion = await UpdateChecker.CheckForUpdateAsync();
if (newVersion is not null)
{
InvokeUI(() => _mainWindow.AddSystemMessage(
HubConstants.DefaultChannel,
$"A new version of EchoHub is available: v{newVersion} (current: v{MainWindow.AppVersion}). Visit https://github.com/HueByte/EchoHub/releases"));
}
});
}, "Connection failed", "Connect");
}