Send article statuses to Feedbin on app terminate
This commit is contained in:
parent
98a262e34b
commit
be81fdae0a
|
@ -212,6 +212,16 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||||
func applicationWillTerminate(_ notification: Notification) {
|
func applicationWillTerminate(_ notification: Notification) {
|
||||||
shuttingDown = true
|
shuttingDown = true
|
||||||
saveState()
|
saveState()
|
||||||
|
|
||||||
|
let group = DispatchGroup()
|
||||||
|
|
||||||
|
group.enter()
|
||||||
|
AccountManager.shared.syncArticleStatusAll() {
|
||||||
|
group.leave()
|
||||||
|
}
|
||||||
|
|
||||||
|
let timeout = DispatchTime.now() + .seconds(1)
|
||||||
|
_ = group.wait(timeout: timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Notifications
|
// MARK: Notifications
|
||||||
|
|
Loading…
Reference in New Issue