IceCubesApp/Packages/Models/Sources/Models/ServerPreferences.swift
Thomas Ricouard 7f6419ebae Swiftformat
2023-01-17 11:36:01 +01:00

24 lines
726 B
Swift

import Foundation
public struct ServerPreferences: Decodable {
public let postVisibility: Visibility?
public let postIsSensitive: Bool?
public let postLanguage: String?
public let autoExpandmedia: AutoExpandMedia?
public let autoExpandSpoilers: Bool?
public enum AutoExpandMedia: String, Decodable {
case showAll = "show_all"
case hideAll = "hide_all"
case hideSensitive = "default"
}
enum CodingKeys: String, CodingKey {
case postVisibility = "posting:default:visibility"
case postIsSensitive = "posting:default:sensitive"
case postLanguage = "posting:default:language"
case autoExpandmedia = "reading:expand:media"
case autoExpandSpoilers = "reading:expand:spoilers"
}
}