mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-11 01:04:05 +01:00
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) {
|
||||
shuttingDown = true
|
||||
saveState()
|
||||
|
||||
let group = DispatchGroup()
|
||||
|
||||
group.enter()
|
||||
AccountManager.shared.syncArticleStatusAll() {
|
||||
group.leave()
|
||||
}
|
||||
|
||||
let timeout = DispatchTime.now() + .seconds(1)
|
||||
_ = group.wait(timeout: timeout)
|
||||
}
|
||||
|
||||
// MARK: Notifications
|
||||
|
Loading…
Reference in New Issue
Block a user