mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Note that AccountManager is main thread only. Add an assert in a strategic location (activeAccounts property).
This commit is contained in:
@@ -10,6 +10,8 @@ import Foundation
|
||||
import RSCore
|
||||
import Articles
|
||||
|
||||
// Main thread only.
|
||||
|
||||
public extension Notification.Name {
|
||||
static let AccountsDidChange = Notification.Name(rawValue: "AccountsDidChange")
|
||||
}
|
||||
@@ -51,6 +53,7 @@ public final class AccountManager: UnreadCountProvider {
|
||||
}
|
||||
|
||||
public var activeAccounts: [Account] {
|
||||
assert(Thread.isMainThread)
|
||||
return Array(accountsDictionary.values.filter { $0.isActive })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user