Skip to content

Commit

Permalink
Merge pull request #1875 from nextcloud/remove-notification-center-ob…
Browse files Browse the repository at this point in the history
…server-when-leaving-chat

Remove NotificationCenter observer when leaving chat
  • Loading branch information
Ivansss authored Nov 14, 2024
2 parents 016809e + c391317 commit c25ceed
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 c25ceed

Please sign in to comment.