mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Clean chatroom on core destroy
This commit is contained in:
parent
b672051864
commit
7d2a79c25b
1 changed files with 14 additions and 0 deletions
|
|
@ -163,6 +163,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
selector:@selector(onMessageChange:)
|
||||
name:UITextViewTextDidChangeNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(coreUpdateEvent:)
|
||||
name:kLinphoneCoreUpdate
|
||||
object:nil];
|
||||
if([tableController isEditing])
|
||||
[tableController setEditing:FALSE animated:FALSE];
|
||||
[editButton setOff];
|
||||
|
|
@ -206,6 +211,9 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[[NSNotificationCenter defaultCenter] removeObserver:self
|
||||
name:UITextViewTextDidChangeNotification
|
||||
object:nil];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self
|
||||
name:kLinphoneCoreUpdate
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
|
|
@ -404,6 +412,12 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
|
||||
#pragma mark - Event Functions
|
||||
|
||||
- (void)coreUpdateEvent:(NSNotification*)notif {
|
||||
if(![LinphoneManager isLcReady]) {
|
||||
chatRoom = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)textReceivedEvent:(NSNotification *)notif {
|
||||
//LinphoneChatRoom *room = [[[notif userInfo] objectForKey:@"room"] pointerValue];
|
||||
//NSString *message = [[notif userInfo] objectForKey:@"message"];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue