aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Models/NewsInfo.swift
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2023-12-19 20:38:13 -0800
committerDustin Mierau <dustin@mierau.me>2023-12-19 20:38:13 -0800
commit4fd69c02a3e7b581bb9229865336c315153f3b18 (patch)
treee6e11d872424196f2b4033077902126ad5556e40 /Hotline/Models/NewsInfo.swift
parent5e87b5927cd931d46fb5f72fb035480a95969a9f (diff)
Beginnings of a UI for macOS as well as some visual changes to iOS client. :)
Diffstat (limited to 'Hotline/Models/NewsInfo.swift')
-rw-r--r--Hotline/Models/NewsInfo.swift5
1 files changed, 5 insertions, 0 deletions
diff --git a/Hotline/Models/NewsInfo.swift b/Hotline/Models/NewsInfo.swift
index ad6bfcd..daab71f 100644
--- a/Hotline/Models/NewsInfo.swift
+++ b/Hotline/Models/NewsInfo.swift
@@ -17,9 +17,12 @@ enum NewsInfoType {
let articleID: UInt?
let path: [String]
+ var expanded: Bool = false
var children: [NewsInfo] = []
var articleFlavors: [String]?
+ var articleUsername: String?
+ var articleDate: Date?
init(hotlineNewsCategory: HotlineNewsCategory) {
self.categoryID = hotlineNewsCategory.id
@@ -46,6 +49,8 @@ enum NewsInfoType {
self.type = .article
self.articleFlavors = hotlineNewsArticle.flavors.map { $0.0 }
+ self.articleUsername = hotlineNewsArticle.username
+ self.articleDate = hotlineNewsArticle.date
}
func hash(into hasher: inout Hasher) {