2023-01-06 11:14:05 +00:00
|
|
|
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")
|
|
|
|
|
2023-01-06 11:14:05 +00:00
|
|
|
@AppStorage("remote_local_timeline") public var remoteLocalTimelines: [String] = []
|
2023-01-08 18:56:16 +00:00
|
|
|
@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")
|
|
|
|
}
|
|
|
|
}
|
2023-01-06 11:14:05 +00:00
|
|
|
|
|
|
|
public init() { }
|
|
|
|
}
|