diff --git a/Packages/Pachyderm/Sources/Pachyderm/Model/Notification.swift b/Packages/Pachyderm/Sources/Pachyderm/Model/Notification.swift index 67d2d52f..405d89e0 100644 --- a/Packages/Pachyderm/Sources/Pachyderm/Model/Notification.swift +++ b/Packages/Pachyderm/Sources/Pachyderm/Model/Notification.swift @@ -21,10 +21,6 @@ public class Notification: Decodable { self.id = try container.decode(String.self, forKey: .id) if let kind = try? container.decode(Kind.self, forKey: .kind) { self.kind = kind - } else if let s = try? container.decode(String.self, forKey: .kind), - s == "status" { - // represent notifications of other people posting as regular mentions for now - self.kind = .mention } else { self.kind = .unknown } @@ -57,6 +53,7 @@ extension Notification { case followRequest = "follow_request" case poll case update + case status case unknown } } diff --git a/Packages/Pachyderm/Sources/Pachyderm/Utilities/NotificationGroup.swift b/Packages/Pachyderm/Sources/Pachyderm/Utilities/NotificationGroup.swift index 655a930a..82e01d74 100644 --- a/Packages/Pachyderm/Sources/Pachyderm/Utilities/NotificationGroup.swift +++ b/Packages/Pachyderm/Sources/Pachyderm/Utilities/NotificationGroup.swift @@ -19,9 +19,10 @@ public struct NotificationGroup: Identifiable, Hashable { self.notifications = notifications self.id = notifications.first!.id self.kind = notifications.first!.kind - if kind == .mention { + switch kind { + case .mention, .status: self.statusState = .unknown - } else { + default: self.statusState = nil } } diff --git a/Tusker/Screens/Notifications/NotificationsPageViewController.swift b/Tusker/Screens/Notifications/NotificationsPageViewController.swift index 1819143e..3f2f84c3 100644 --- a/Tusker/Screens/Notifications/NotificationsPageViewController.swift +++ b/Tusker/Screens/Notifications/NotificationsPageViewController.swift @@ -72,7 +72,9 @@ class NotificationsPageViewController: SegmentedPageViewController