aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
index 25a4f8c4b..0371e94da 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
@@ -162,6 +162,16 @@ namespace Tango.PPC.UI.ViewModels
LatestVersion = response.Version;
await NavigateTo(MachineUpdateView.UpdateAvailableView);
}
+ else if (response.IsDatabaseUpdateAvailable)
+ {
+ IsDbUpdate = true;
+ _db_compare_result = new DbCompareResult()
+ {
+ RequiresUpdate = true,
+ UpdateDBResponse = response.UpdateDBResponse
+ };
+ await NavigateTo(MachineUpdateView.UpdateAvailableView);
+ }
else
{
_db_compare_result = await MachineUpdateManager.UpdateDBCheck(MachineProvider.Machine.SerialNumber);
@@ -418,12 +428,13 @@ namespace Tango.PPC.UI.ViewModels
{
if (!IsVisible && _updateNotificationItem == null)
{
- LogManager.Log($"New application version detected ({e.Version}). Pushing notification...");
+ LogManager.Log($"New {(e.IsDatabaseUpdateAvailable ? "database updates" : "application version")} detected ({e.Version}). Pushing notification...");
InvokeUI(() =>
{
_updateNotificationItem = new UpdateAvailableNotificationItem();
_updateNotificationItem.Version = Version.Parse(e.Version).ToString(3);
+ _updateNotificationItem.IsDatabaseUpdate = e.IsDatabaseUpdateAvailable && !e.IsUpdateAvailable;
_updateNotificationItem.Pressed += (_, __) =>
{
_updateNotificationItem = null;