Add article text size to the app defaults

This commit is contained in:
Maurice Parker 2020-11-04 17:13:02 -06:00
parent 6b5bb6a45b
commit 89d0765f9b

View File

@ -72,6 +72,7 @@ final class AppDefaults: ObservableObject {
static let confirmMarkAllAsRead = "confirmMarkAllAsRead"
// macOS Defaults
static let articleTextSize = "articleTextSize"
static let openInBrowserInBackground = "openInBrowserInBackground"
static let defaultBrowserID = "defaultBrowserID"
static let checkForUpdatesAutomatically = "checkForUpdatesAutomatically"
@ -231,6 +232,16 @@ final class AppDefaults: ObservableObject {
@AppStorage(wrappedValue: false, Key.articleFullscreenEnabled, store: store) var articleFullscreenEnabled: Bool
@AppStorage(wrappedValue: 3, Key.articleTextSize, store: store) var articleTextSizeTag: Int {
didSet {
objectWillChange.send()
}
}
var articleTextSize: ArticleTextSize {
ArticleTextSize(rawValue: articleTextSizeTag) ?? ArticleTextSize.large
}
// MARK: Refresh
var lastRefresh: Date? {
set {