aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Models/NewsCategory.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hotline/Models/NewsCategory.swift')
-rw-r--r--Hotline/Models/NewsCategory.swift34
1 files changed, 0 insertions, 34 deletions
diff --git a/Hotline/Models/NewsCategory.swift b/Hotline/Models/NewsCategory.swift
deleted file mode 100644
index 0ba87a7..0000000
--- a/Hotline/Models/NewsCategory.swift
+++ /dev/null
@@ -1,34 +0,0 @@
-import SwiftUI
-
-enum NewsCategoryType {
- case bundle
- case category
-}
-
-@Observable class NewsCategory: Identifiable, Hashable {
- let id: UUID = UUID()
-
- let name: String
- let count: UInt16
- let type: NewsCategoryType
-
- init(hotlineNewsCategory: HotlineNewsCategory) {
- self.name = hotlineNewsCategory.name
- self.count = hotlineNewsCategory.count
-
- if hotlineNewsCategory.type == 2 {
- self.type = .bundle
- }
- else {
- self.type = .category
- }
- }
-
- func hash(into hasher: inout Hasher) {
- hasher.combine(self.id)
- }
-
- static func == (lhs: NewsCategory, rhs: NewsCategory) -> Bool {
- return lhs.id == rhs.id
- }
-}