mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 08:17:16 +00:00
26 lines
585 B
Swift
26 lines
585 B
Swift
//
|
|
// AppDefaults+Shared.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Brent Simmons on 10/6/26.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
private extension AppDefaults.Key {
|
|
static let unreadCountDisplay = "unreadCountDisplay"
|
|
}
|
|
|
|
extension AppDefaults {
|
|
|
|
var unreadCountDisplay: UnreadCountDisplay {
|
|
get {
|
|
UnreadCountDisplay(rawValue: UserDefaults.standard.integer(forKey: Key.unreadCountDisplay)) ?? .count
|
|
}
|
|
set {
|
|
UserDefaults.standard.set(newValue.rawValue, forKey: Key.unreadCountDisplay)
|
|
NotificationCenter.default.post(name: .unreadCountDisplaySettingDidChange, object: self)
|
|
}
|
|
}
|
|
}
|