Make AccountManager.shared actually call init.
This commit is contained in:
parent
c784569040
commit
44a9a52705
@ -15,7 +15,7 @@ import Core
|
||||
|
||||
@MainActor public final class AccountManager: UnreadCountProvider {
|
||||
|
||||
@MainActor public static var shared: AccountManager!
|
||||
@MainActor public static var shared = AccountManager()
|
||||
public static let netNewsWireNewsURL = "https://netnewswire.blog/feed.xml"
|
||||
private static let jsonNetNewsWireNewsURL = "https://netnewswire.blog/feed.json"
|
||||
|
||||
|
@ -50,10 +50,7 @@ public extension Article {
|
||||
|
||||
@MainActor var account: Account? {
|
||||
// The force unwrapped shared instance was crashing Account.framework unit tests.
|
||||
guard let manager = AccountManager.shared else {
|
||||
return nil
|
||||
}
|
||||
return manager.existingAccount(with: accountID)
|
||||
return AccountManager.shared.existingAccount(with: accountID)
|
||||
}
|
||||
|
||||
@MainActor var feed: Feed? {
|
||||
|
@ -18,7 +18,7 @@ public enum ArticleExtractorState: Sendable {
|
||||
case cancelled
|
||||
}
|
||||
|
||||
public protocol ArticleExtractorDelegate {
|
||||
public protocol ArticleExtractorDelegate: AnyObject {
|
||||
|
||||
@MainActor func articleExtractionDidFail(with: Error)
|
||||
@MainActor func articleExtractionDidComplete(extractedArticle: ExtractedArticle)
|
||||
@ -28,7 +28,7 @@ public protocol ArticleExtractorDelegate {
|
||||
|
||||
public var state: ArticleExtractorState!
|
||||
public var article: ExtractedArticle?
|
||||
public var delegate: ArticleExtractorDelegate?
|
||||
public weak var delegate: ArticleExtractorDelegate?
|
||||
public let articleLink: String?
|
||||
|
||||
private var dataTask: URLSessionDataTask? = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user