Skip to content

Commit 6f81ce7

Browse files
authored
Merge pull request #1876 from nextcloud/backport/1875/stable20
[stable20] Remove NotificationCenter observer when leaving chat
2 parents 9b522cb + fbb8bb2 commit 6f81ce7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

NextcloudTalk/ChatViewController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,10 @@ import UIKit
649649
self.messageExpirationTimer?.invalidate()
650650
self.chatController.stop()
651651

652+
// Dismiss possible notifications
653+
// swiftlint:disable:next notification_center_detachment
654+
NotificationCenter.default.removeObserver(self)
655+
652656
// In case we're typing when we leave the chat, make sure we notify everyone
653657
// The 'stopTyping' method makes sure to only send signaling messages when we were typing before
654658
self.stopTyping(force: false)

0 commit comments

Comments
 (0)