refreshTimeline removed
This commit is contained in:
parent
8498e723ce
commit
5780c8066d
@ -27,7 +27,7 @@ public final class WidgetDataEncoder {
|
|||||||
private init () {}
|
private init () {}
|
||||||
|
|
||||||
@available(iOS 14, *)
|
@available(iOS 14, *)
|
||||||
func encodeWidgetData(refreshTimeline: Bool = true) throws {
|
func encodeWidgetData() throws {
|
||||||
os_log(.debug, log: log, "Starting encoding widget data.")
|
os_log(.debug, log: log, "Starting encoding widget data.")
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -100,14 +100,9 @@ public final class WidgetDataEncoder {
|
|||||||
}
|
}
|
||||||
if FileManager.default.createFile(atPath: self.dataURL!.path, contents: encodedData, attributes: nil) {
|
if FileManager.default.createFile(atPath: self.dataURL!.path, contents: encodedData, attributes: nil) {
|
||||||
os_log(.debug, log: self.log, "Wrote widget data to container.")
|
os_log(.debug, log: self.log, "Wrote widget data to container.")
|
||||||
if refreshTimeline == true {
|
WidgetCenter.shared.reloadAllTimelines()
|
||||||
WidgetCenter.shared.reloadAllTimelines()
|
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
|
||||||
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
|
self.backgroundTaskID = .invalid
|
||||||
self.backgroundTaskID = .invalid
|
|
||||||
} else {
|
|
||||||
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
|
|
||||||
self.backgroundTaskID = .invalid
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
|
UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
|
||||||
self.backgroundTaskID = .invalid
|
self.backgroundTaskID = .invalid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user