From 54dd55db8c19667939536e18535ac9c45817e442 Mon Sep 17 00:00:00 2001 From: ivar Date: Wed, 6 May 2026 21:21:17 +0200 Subject: refactor: remove duplicate source files now served from Shared/ --- Solsnu.Widget/Solsnu_Widget.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Solsnu.Widget/Solsnu_Widget.swift') diff --git a/Solsnu.Widget/Solsnu_Widget.swift b/Solsnu.Widget/Solsnu_Widget.swift index 20e8a8e..c36cc34 100644 --- a/Solsnu.Widget/Solsnu_Widget.swift +++ b/Solsnu.Widget/Solsnu_Widget.swift @@ -171,22 +171,22 @@ extension SolvervDef { } var nextEvent: SolsticeEvent? { - SolsticeData.shared.nextEvent() + SolsticeData.shared.nextEvent(from: date) } func daysUntilNext() -> Int { guard let next = nextEvent else { return 0 } - return next.daysUntil() + return next.daysUntil(from: date) } func progressRatio() -> Double { - guard let progress = SolsticeData.shared.progressToNextEvent() else { return 0.0 } + guard let progress = SolsticeData.shared.progressToNextEvent(from: date) else { return 0.0 } let ratio = Double(progress.elapsed) / Double(progress.total) return max(0, min(1.0, ratio)) } func upcomingEventsPreview(count: Int) -> [SolsticeEvent] { - SolsticeData.shared.upcomingEvents(count: count) + SolsticeData.shared.upcomingEvents(count: count, from: date) } static var preview: SolvervDef { -- cgit v1.3