Преглед изворни кода

Remove default from `isSameTimeUnit`

Mike Plante пре 11 месеци
родитељ
комит
6c5b0d6e80

+ 1 - 1
Trio/Sources/Modules/Stat/View/StatChartUtils.swift

@@ -107,7 +107,7 @@ struct StatChartUtils {
     static func isSameTimeUnit(
         _ date1: Date,
         _ date2: Date,
-        for selectedInterval: Stat.StateModel.StatsTimeInterval = .total
+        for selectedInterval: Stat.StateModel.StatsTimeInterval
     ) -> Bool {
         let calendar = Calendar.current
         switch selectedInterval {

+ 1 - 1
Trio/Sources/Modules/Stat/View/ViewElements/Glucose/GlucoseDailyPercentileChart.swift

@@ -381,7 +381,7 @@ struct GlucoseDailyPercentileChart: View {
     // Helper function to determine opacity based on selections
     private func getOpacity(for day: GlucoseDailyPercentileStats) -> Double {
         selectedDate.map { date in
-            StatChartUtils.isSameTimeUnit(day.date, date) ? 1 : 0.3
+            StatChartUtils.isSameTimeUnit(day.date, date, for: .total) ? 1 : 0.3
         } ?? 1
     }