mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 06:38:08 +00:00
Fix the chat not scrolling every time when a new
message is posted.
This commit is contained in:
parent
10ac514325
commit
69f88f2825
2 changed files with 6 additions and 8 deletions
|
|
@ -93,12 +93,10 @@
|
|||
}
|
||||
|
||||
- (void)scrollToBottom:(BOOL)animated {
|
||||
CGSize size = [self.tableView contentSize];
|
||||
CGRect bounds = [self.tableView bounds];
|
||||
bounds.origin.y = size.height - bounds.size.height;
|
||||
|
||||
[self.tableView.layer removeAllAnimations];
|
||||
[self.tableView scrollRectToVisible:bounds animated:animated];
|
||||
[self.tableView reloadData];
|
||||
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:([data count] - 1) inSection:0]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:YES];
|
||||
}
|
||||
|
||||
- (void)scrollToLastUnread:(BOOL)animated {
|
||||
|
|
|
|||
|
|
@ -355,9 +355,9 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
[chat setState:[NSNumber numberWithInt:1]]; //INPROGRESS
|
||||
[chat create];
|
||||
[tableController addChatEntry:chat];
|
||||
[tableController scrollToBottom:TRUE];
|
||||
[tableController scrollToBottom:true];
|
||||
[chat release];
|
||||
|
||||
|
||||
LinphoneChatMessage* msg = linphone_chat_room_create_message(chatRoom, [message UTF8String]);
|
||||
linphone_chat_message_set_user_data(msg, [chat retain]);
|
||||
if(externalUrl) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue