refreshTimeline removed

This commit is contained in:
Stuart Breckenridge 2020-12-03 20:41:37 +08:00
parent 8498e723ce
commit 5780c8066d
No known key found for this signature in database
GPG Key ID: 1F11FD62007DC331
1 changed files with 4 additions and 9 deletions

View File

@ -27,7 +27,7 @@ public final class WidgetDataEncoder {
private init () {}
@available(iOS 14, *)
func encodeWidgetData(refreshTimeline: Bool = true) throws {
func encodeWidgetData() throws {
os_log(.debug, log: log, "Starting encoding widget data.")
do {
@ -100,7 +100,6 @@ public final class WidgetDataEncoder {
}
if FileManager.default.createFile(atPath: self.dataURL!.path, contents: encodedData, attributes: nil) {
os_log(.debug, log: self.log, "Wrote widget data to container.")
if refreshTimeline == true {
WidgetCenter.shared.reloadAllTimelines()
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
self.backgroundTaskID = .invalid
@ -108,10 +107,6 @@ public final class WidgetDataEncoder {
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
self.backgroundTaskID = .invalid
}
} else {
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
self.backgroundTaskID = .invalid
}
}
}