NetNewsWire-Mac AppDefaults is now a singleton

This commit is contained in:
Stuart Breckenridge
2020-07-02 11:17:38 +08:00
parent f92b219cdc
commit a57f98e4e7
18 changed files with 110 additions and 107 deletions

View File

@@ -167,7 +167,7 @@ private extension TimelineContainerViewController {
func updateViewOptionsPopUpButton() {
let localizedTitle = NSLocalizedString("Sort %@", comment: "Sort")
if AppDefaults.timelineSortDirection == .orderedAscending {
if AppDefaults.shared.timelineSortDirection == .orderedAscending {
newestToOldestMenuItem.state = .off
oldestToNewestMenuItem.state = .on
let title = NSString.localizedStringWithFormat(localizedTitle as NSString, oldestToNewestMenuItem.title) as String
@@ -179,7 +179,7 @@ private extension TimelineContainerViewController {
viewOptionsPopUpButton.setTitle(title)
}
if AppDefaults.timelineGroupByFeed == true {
if AppDefaults.shared.timelineGroupByFeed == true {
groupByFeedMenuItem.state = .on
} else {
groupByFeedMenuItem.state = .off