diff --git a/NucleicRemote/NucleicRemote/Views/HomeView.swift b/NucleicRemote/NucleicRemote/Views/HomeView.swift index 449e128..696e20b 100644 --- a/NucleicRemote/NucleicRemote/Views/HomeView.swift +++ b/NucleicRemote/NucleicRemote/Views/HomeView.swift @@ -192,6 +192,9 @@ struct ActivityGrid: View { let weekday = cal.component(.weekday, from: today) let startOfWeek = cal.date(byAdding: .day, value: -(weekday - 1), to: today)! let gridStart = cal.date(byAdding: .day, value: -7 * (weeks - 1), to: startOfWeek)! + // Brightness relative to *this user's* activity, outliers excluded so a few marathon + // days don't crush the everyday range. Computed once for the whole grid (mirrors Mac). + let scale = ActivityScale(activityByDay: activityByDay) return HStack(alignment: .top, spacing: gap) { ForEach(0.. Int { - switch count { - case 0: 0 - case 1...2: 1 - case 3...5: 2 - default: 3 - } - } }