@@ -101,7 +101,7 @@ final class NotificationModelController {
101101 return
102102 }
103103
104- let content = " state comments{totalCount} "
104+ let content = " state comments{totalCount} viewerSubscription "
105105 let notificationQueries : String = notifications. compactMap {
106106 guard let alias = $0. stateAlias else { return nil }
107107 return """
@@ -124,10 +124,12 @@ final class NotificationModelController {
124124 let stateString = issueOrPullRequest [ " state " ] as? String ,
125125 let state = NotificationViewModel . State ( rawValue: stateString) ,
126126 let commentsJSON = issueOrPullRequest [ " comments " ] as? [ String : Any ] ,
127- let commentCount = commentsJSON [ " totalCount " ] as? Int {
127+ let commentCount = commentsJSON [ " totalCount " ] as? Int ,
128+ let subscription = issueOrPullRequest [ " viewerSubscription " ] as? String {
128129 var newNotification = notification
129130 newNotification. state = state
130131 newNotification. comments = commentCount
132+ newNotification. watching = subscription != " IGNORED "
131133 updatedNotifications. append ( newNotification)
132134 } else {
133135 updatedNotifications. append ( notification)
@@ -186,7 +188,7 @@ final class NotificationModelController {
186188 model. watching = !notification. watching
187189 cache. set ( value: model)
188190
189- githubClient. client. send ( V3SubscribeThreadRequest ( id: model. v3id, ignore: model. watching) ) { result in
191+ githubClient. client. send ( V3SubscribeThreadRequest ( id: model. v3id, ignore: ! model. watching) ) { result in
190192 switch result {
191193 case . success:
192194 Haptic . triggerSelection ( )
0 commit comments