Activity Chart Intensity Logic
Nucleic-Session: 76D64900-B16F-45BE-A6CB-E3D2EBC7C73A Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -18,6 +18,12 @@ struct HomeView: View {
|
|||||||
Dictionary(store.dashboard.activity.map { (Calendar.current.startOfDay(for: $0.day), $0.count) },
|
Dictionary(store.dashboard.activity.map { (Calendar.current.startOfDay(for: $0.day), $0.count) },
|
||||||
uniquingKeysWith: +)
|
uniquingKeysWith: +)
|
||||||
}
|
}
|
||||||
|
/// Tokens used per day — the activity grid's primary intensity signal (falls back to message
|
||||||
|
/// count for days without recorded usage). Mirrors the Mac home.
|
||||||
|
private var tokensByDay: [Date: Int] {
|
||||||
|
Dictionary(store.dashboard.activity.map { (Calendar.current.startOfDay(for: $0.day), $0.tokens) },
|
||||||
|
uniquingKeysWith: +)
|
||||||
|
}
|
||||||
|
|
||||||
/// Current activity streak with streak freezes folded in — the run of consecutive active
|
/// Current activity streak with streak freezes folded in — the run of consecutive active
|
||||||
/// days, where a banked freeze (one earned per five days) bridges a missed day. Shared with
|
/// days, where a banked freeze (one earned per five days) bridges a missed day. Shared with
|
||||||
|
|||||||
Reference in New Issue
Block a user