From af972a55a202dc555c7a3b4b7e2079fd0236a14b Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Thu, 9 Jul 2026 01:50:25 -0700 Subject: [PATCH] Add Usage Metrics Nucleic-Session: B4F51091-BE3C-42D3-BCDD-8E89E83543D0 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Views/StatusAndQuota.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Views/StatusAndQuota.swift b/NucleicRemote/NucleicRemote/Views/StatusAndQuota.swift index a73f198..588e591 100644 --- a/NucleicRemote/NucleicRemote/Views/StatusAndQuota.swift +++ b/NucleicRemote/NucleicRemote/Views/StatusAndQuota.swift @@ -26,7 +26,11 @@ enum QuotaFormat { } static func resetCaption(_ window: WireUsageWindow, now: Date) -> String? { - guard let resetsAt = window.resetsAt else { return nil } + resetCaption(window.resetsAt, now: now) + } + + static func resetCaption(_ resetsAt: Date?, now: Date) -> String? { + guard let resetsAt else { return nil } let remaining = resetsAt.timeIntervalSince(now) guard remaining > 0 else { return "resetting…" } return "resets in \(duration(remaining))"