File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,16 +197,17 @@ private extension AppDelegate {
197197 let listener = store. collection ( " users/ \( uid) /notifications " )
198198 . whereField ( " isRead " , isEqualTo: false )
199199 . addSnapshotListener { [ weak self] snapshot, error in
200+ guard let self else { return }
200201 if let error {
201- self ? . logger. error ( " Failed to observe unread notification count " , error: error)
202+ self . logger. error ( " Failed to observe unread notification count " , error: error)
202203 subject. send ( completion: . failure( error) )
203204 return
204205 }
205206
206207 guard let snapshot else { return }
207208
208209 let unreadNotificationCount = snapshot. documents. count
209- self ? . logger. info ( " Observed unread notification count: \( unreadNotificationCount) " )
210+ self . logger. info ( " Observed unread notification count: \( unreadNotificationCount) " )
210211 subject. send ( unreadNotificationCount)
211212 }
212213
You can’t perform that action at this time.
0 commit comments