Skip to content

Commit

Permalink
Remove NotificationCenter observer when leaving chat.
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sein <[email protected]>
  • Loading branch information
Ivansss authored and backportbot[bot] committed Nov 14, 2024
1 parent 9b522cb commit fbb8bb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NextcloudTalk/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,10 @@ import UIKit
self.messageExpirationTimer?.invalidate()
self.chatController.stop()

// Dismiss possible notifications
// swiftlint:disable:next notification_center_detachment
NotificationCenter.default.removeObserver(self)

// In case we're typing when we leave the chat, make sure we notify everyone
// The 'stopTyping' method makes sure to only send signaling messages when we were typing before
self.stopTyping(force: false)
Expand Down

0 comments on commit fbb8bb2

Please sign in to comment.