aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Models/NewsInfo.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hotline/Models/NewsInfo.swift')
-rw-r--r--Hotline/Models/NewsInfo.swift4
1 files changed, 4 insertions, 0 deletions
diff --git a/Hotline/Models/NewsInfo.swift b/Hotline/Models/NewsInfo.swift
index b635138..eecd550 100644
--- a/Hotline/Models/NewsInfo.swift
+++ b/Hotline/Models/NewsInfo.swift
@@ -26,6 +26,10 @@ enum NewsInfoType {
var articleDate: Date?
var read: Bool = false
+ var expandable: Bool {
+ self.type == .bundle || self.type == .category || self.children.count > 0
+ }
+
init(hotlineNewsCategory: HotlineNewsCategory) {
self.categoryID = hotlineNewsCategory.id
self.articleID = nil