Restore taskbar

This commit is contained in:
Patrick Fic
2021-02-26 07:22:29 -08:00
parent 1a575884f4
commit 6b819ada41
3 changed files with 37 additions and 4 deletions

View File

@@ -88,13 +88,28 @@ namespace BodyshopPartner.ViewModels
private async Task updateCheck()
{
#if (!DEBUG)
logger.Debug("Checking if updates are available.");
UpdateAvailable = await Utils.UpdateHandler.AreUpdatesAvailable();
if (UpdateAvailable)
{
string msg = "An update to ImEX Online Partner is Available";
string msg = "An update to ImEX Online Partner is Available. It will be automatically downloaded and applied.";
Utils.Notifications.notifier.ShowInformation(msg);
logger.Debug("Updates are available! Installing.");
try
{
await Utils.UpdateHandler.ApplyUpdates((val) => UpdateProgress = val, (val) => UpdateProgress = val);
}
catch (Exception Ex)
{
logger.Error("Error while updating." + Ex.ToString());
}
}
#endif
}