Room chat: Improve instance destruction

This commit is contained in:
giomfo
2016-06-27 15:34:17 +02:00
parent 0fb3f81f20
commit 316a2ff836
2 changed files with 18 additions and 1 deletions
+11 -1
View File
@@ -684,6 +684,14 @@
customizedRoomDataSource = nil;
}
[self removeTypingNotificationsListener];
if (kAppDelegateDidTapStatusBarNotificationObserver)
{
[[NSNotificationCenter defaultCenter] removeObserver:kAppDelegateDidTapStatusBarNotificationObserver];
kAppDelegateDidTapStatusBarNotificationObserver = nil;
}
if (previewHeader || (self.expandedHeaderContainer.isHidden == NO))
{
// Here [destroy] is called before [viewWillDisappear:]
@@ -2069,9 +2077,11 @@
if (typingNotifListener)
{
[self.roomDataSource.room.liveTimeline removeListener:typingNotifListener];
currentTypingUsers = nil;
typingNotifListener = nil;
}
}
currentTypingUsers = nil;
}
- (void)listenTypingNotifications