diff --git a/xdrip/View Controllers/Root View Controller/RootViewController.swift b/xdrip/View Controllers/Root View Controller/RootViewController.swift index 106286677..13eef4df0 100644 --- a/xdrip/View Controllers/Root View Controller/RootViewController.swift +++ b/xdrip/View Controllers/Root View Controller/RootViewController.swift @@ -2766,7 +2766,7 @@ final class RootViewController: UIViewController, ObservableObject { // disable the chart animation if it's just a normal update, enable it if the call comes from didAppear() - if animate { + if animate && UserDefaults.standard.animateProgressBar { self.pieChartOutlet.animDuration = ConstantsStatistics.pieChartAnimationSpeed } else { self.pieChartOutlet.animDuration = 0 @@ -3147,7 +3147,12 @@ final class RootViewController: UIViewController, ObservableObject { } else { // fill in the labels to show sensor time elapsed and max age - dataSourceSensorCurrentAgeOutlet.text = sensorStartDate?.daysAndHoursAgo() + if UserDefaults.standard.reverseProgressBar { + dataSourceSensorCurrentAgeOutlet.text = sensorTimeLeftInMinutes.minutesToDaysAndHours() + } else { + dataSourceSensorCurrentAgeOutlet.text = sensorStartDate?.daysAndHoursAgo() + } + dataSourceSensorMaxAgeOutlet.text = " / " + sensorMaxAgeInMinutes.minutesToDaysAndHours() @@ -3157,7 +3162,11 @@ final class RootViewController: UIViewController, ObservableObject { } else { // fill in the labels to show sensor time elapsed and max age - dataSourceSensorCurrentAgeOutlet.text = sensorStartDate?.daysAndHoursAgo() + if UserDefaults.standard.reverseProgressBar { + dataSourceSensorCurrentAgeOutlet.text = sensorTimeLeftInMinutes.minutesToDaysAndHours() + } else { + dataSourceSensorCurrentAgeOutlet.text = sensorStartDate?.daysAndHoursAgo() + } dataSourceSensorMaxAgeOutlet.text = " / " + sensorMaxAgeInMinutes.minutesToDaysAndHours()