2024-12-11 10:54:12 +00:00
|
|
|
public extension Rant {
|
|
|
|
/// Holds information about a specific weekly group rant.
|
2024-12-22 16:24:48 +00:00
|
|
|
struct Weekly: Hashable, Sendable {
|
2024-12-11 10:54:12 +00:00
|
|
|
public let week: Int
|
|
|
|
public let topic: String
|
|
|
|
public let date: String
|
|
|
|
public let uiHeight: Int
|
|
|
|
|
|
|
|
public init(week: Int, topic: String, date: String, uiHeight: Int) {
|
|
|
|
self.week = week
|
|
|
|
self.topic = topic
|
|
|
|
self.date = date
|
|
|
|
self.uiHeight = uiHeight
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension Rant.Weekly {
|
|
|
|
struct CodingData: Codable {
|
|
|
|
let week: Int
|
|
|
|
let topic: String
|
|
|
|
let date: String
|
|
|
|
let height: Int
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension Rant.Weekly.CodingData {
|
|
|
|
var decoded: Rant.Weekly {
|
|
|
|
.init(
|
|
|
|
week: week,
|
|
|
|
topic: topic,
|
|
|
|
date: date,
|
|
|
|
uiHeight: height
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|