NetNewsWire-iOS AppDefaults is now a singleton

This commit is contained in:
Stuart Breckenridge
2020-07-02 10:47:45 +08:00
parent 0233c98a1b
commit f92b219cdc
13 changed files with 105 additions and 102 deletions

View File

@@ -132,7 +132,7 @@ class ArticleViewController: UIViewController {
articleExtractorButton.buttonState = controller.articleExtractorButtonState
self.pageViewController.setViewControllers([controller], direction: .forward, animated: false, completion: nil)
if AppDefaults.articleFullscreenEnabled {
if AppDefaults.shared.articleFullscreenEnabled {
controller.hideBars()
}
@@ -183,7 +183,7 @@ class ArticleViewController: UIViewController {
starBarButtonItem.isEnabled = true
let permalinkPresent = article.preferredLink != nil
articleExtractorButton.isEnabled = permalinkPresent && !AppDefaults.isDeveloperBuild
articleExtractorButton.isEnabled = permalinkPresent && !AppDefaults.shared.isDeveloperBuild
actionBarButtonItem.isEnabled = permalinkPresent
if article.status.read {
@@ -230,7 +230,7 @@ class ArticleViewController: UIViewController {
@objc func willEnterForeground(_ note: Notification) {
// The toolbar will come back on you if you don't hide it again
if AppDefaults.articleFullscreenEnabled {
if AppDefaults.shared.articleFullscreenEnabled {
currentWebViewController?.hideBars()
}
}