mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-06 15:56:19 +02:00
feat: implement background update check and add version notification in AppOrchestrator
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user