Make AccountManager and ArticleThemesManager self-initing.

This commit is contained in:
Brent Simmons
2025-02-01 19:37:59 -08:00
parent 8a123a0734
commit e9fc4c09ed
5 changed files with 16 additions and 23 deletions

View File

@@ -16,7 +16,7 @@ public extension Notification.Name {
final class ArticleThemesManager: NSObject, NSFilePresenter {
static var shared: ArticleThemesManager!
static let shared = ArticleThemesManager()
public let folderPath: String
lazy var presentedItemOperationQueue = OperationQueue.main
@@ -49,8 +49,9 @@ final class ArticleThemesManager: NSObject, NSFilePresenter {
}
}
init(folderPath: String) {
self.folderPath = folderPath
override init() {
let folderURL = AppConfig.dataSubfolder(named: "Themes")
self.folderPath = folderURL.path
self.currentTheme = ArticleTheme.defaultTheme
super.init()