mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
⚡️ Change Widget Refresh Policy
Change widget update policy to never to give app more control of refresh timings.
This commit is contained in:
1 file changed
+1
-4
@@ -54,12 +54,9 @@ struct Provider: TimelineProvider {
|
||||
entry = WidgetTimelineEntry(date: date, widgetData: WidgetData(currentUnreadCount: 0, currentTodayCount: 0, currentStarredCount: 0, unreadArticles: [], starredArticles: [], todayArticles: [], lastUpdateTime: Date()))
|
||||
}
|
||||
|
||||
// Configure next update in 1 hour.
|
||||
let nextUpdateDate = Calendar.current.date(byAdding: .hour, value: 1, to: date)!
|
||||
|
||||
let timeline = Timeline(
|
||||
entries: [entry],
|
||||
policy: .after(nextUpdateDate))
|
||||
policy: .never)
|
||||
|
||||
completion(timeline)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user