More logging
This commit is contained in:
parent
307299dd4d
commit
ff9286ca48
|
@ -104,6 +104,7 @@ class BackgroundManager: NSObject {
|
||||||
do {
|
do {
|
||||||
try await fervorController.persistentContainer.upsertItems(items)
|
try await fervorController.persistentContainer.upsertItems(items)
|
||||||
logger.info("Upserted \(items.count) items during background refresh")
|
logger.info("Upserted \(items.count) items during background refresh")
|
||||||
|
logger.info("Most recent unread item: \(items.first(where: { $0.read == false })!.title!, privacy: .public)")
|
||||||
|
|
||||||
await WidgetHelper.updateWidgetData(fervorController: fervorController)
|
await WidgetHelper.updateWidgetData(fervorController: fervorController)
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,8 @@ struct WidgetHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info("Saving widget data with first item: '\(prioritizedItems.first!.title ?? "<untitled>", privacy: .public)'")
|
||||||
|
|
||||||
WidgetData(recentItems: prioritizedItems).save(account: fervorController.account!)
|
WidgetData(recentItems: prioritizedItems).save(account: fervorController.account!)
|
||||||
|
|
||||||
WidgetCenter.shared.reloadAllTimelines()
|
WidgetCenter.shared.reloadAllTimelines()
|
||||||
|
|
Loading…
Reference in New Issue