IceCubesApp/Packages/Env/Sources/Env/UserPreferences.swift

20 lines
611 B
Swift
Raw Normal View History

import SwiftUI
import Foundation
public class UserPreferences: ObservableObject {
2023-01-09 17:52:53 +00:00
private static let sharedDefault = UserDefaults.init(suiteName: "group.icecubesapps")
@AppStorage("remote_local_timeline") public var remoteLocalTimelines: [String] = []
@AppStorage("preferred_browser") public var preferredBrowser: PreferredBrowser = .inAppSafari
2023-01-09 17:52:53 +00:00
public var pushNotificationsCount: Int {
get {
Self.sharedDefault?.integer(forKey: "push_notifications_count") ?? 0
}
set {
Self.sharedDefault?.set(newValue, forKey: "push_notifications_count")
}
}
public init() { }
}