Updates to logging and v1.0.3 release.

This commit is contained in:
Patrick Fic
2020-12-03 10:41:57 -08:00
parent 12b095a406
commit 2acc8faa5b
9 changed files with 113 additions and 26 deletions

View File

@@ -91,13 +91,20 @@ namespace BodyshopPartner.ViewModels
private async Task updateCheck()
{
logger.Debug("Checking if updates are available.");
if (await Utils.UpdateHandler.AreUpdatesAvailable())
UpdateAvailable = await Utils.UpdateHandler.AreUpdatesAvailable();
if (UpdateAvailable)
{
logger.Debug("Updates are available! Installing.");
await Utils.UpdateHandler.ApplyUpdates(Progress, Progress);
string msg = "An update to ImEX Online Partner is Available";
Utils.Notifications.notifier.ShowInformation(msg);
}
}
private async Task InstallUpdates()
{
logger.Debug("Updates are available! Installing.");
await Utils.UpdateHandler.ApplyUpdates(UpdateProgress, UpdateProgress);
}
private async void _updateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
await updateCheck();