diff --git a/xdrip/View Controllers/Root View Controller/RootViewController.swift b/xdrip/View Controllers/Root View Controller/RootViewController.swift index 7abf6c917..5c0427ca4 100644 --- a/xdrip/View Controllers/Root View Controller/RootViewController.swift +++ b/xdrip/View Controllers/Root View Controller/RootViewController.swift @@ -2790,7 +2790,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 @@ -3171,7 +3171,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() @@ -3181,7 +3186,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()