Fix chartroom exit and composition indicator glitching the list view

This commit is contained in:
Guillaume BIENKOWSKI 2014-03-07 14:52:33 +01:00
parent bf7af8ccfa
commit 11f5400fa9
2 changed files with 8 additions and 2 deletions

View file

@ -35,6 +35,7 @@
ImageSharing *imageSharing;
OrderedDictionary *imageQualities;
BOOL scrollOnGrowingEnabled;
BOOL composingVisible;
}
@property (nonatomic, retain) IBOutlet ChatRoomTableViewController* tableController;

View file

@ -62,6 +62,7 @@
[NSNumber numberWithFloat:0.9], NSLocalizedString(@"Maximum", nil),
[NSNumber numberWithFloat:0.5], NSLocalizedString(@"Average", nil),
[NSNumber numberWithFloat:0.0], NSLocalizedString(@"Minimum", nil), nil];
self->composingVisible = TRUE;
}
return self;
}
@ -440,6 +441,9 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
}
- (void)setComposingVisible:(BOOL)visible withDelay:(CGFloat)delay {
if( composingVisible == visible ) return;
CGRect keyboardFrame = [self.messageView frame];
CGRect newComposingFrame = [self.composeIndicatorView frame];
CGRect newTableFrame = [self.tableController.tableView frame];
@ -459,10 +463,11 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
animations:^{
self.tableController.tableView.frame = newTableFrame;
self.composeIndicatorView.frame = newComposingFrame;
} completion:^(BOOL finished) {
}
completion:^(BOOL finished) {
composingVisible = visible;
[self.tableController scrollToBottom:TRUE];
}];
}