Only invoke OnUpdateAvailable if update available

This commit is contained in:
Pat Hartl 2024-07-26 00:53:59 -05:00
parent 327de18b8c
commit bb7066dd41

View file

@ -23,11 +23,12 @@ namespace LANCommander.Client.Services
public async Task<SemVersion> CheckForUpdateAsync()
{
var serverVersion = await Client.Launcher.CheckForUpdateAsync();
var updateVersion = await Client.Launcher.CheckForUpdateAsync();
OnUpdateAvailable?.Invoke(serverVersion);
if (updateVersion != null)
OnUpdateAvailable?.Invoke(updateVersion);
return serverVersion;
return updateVersion;
}
public async Task UpdateAsync(SemVersion version)