fix UI on ipad

This commit is contained in:
Benjamin Reis 2018-05-03 15:25:33 +02:00
parent b64b6fc441
commit 08ca95be22
2 changed files with 7 additions and 4 deletions

View file

@ -770,6 +770,9 @@ void on_chat_room_chat_message_sent(LinphoneChatRoom *cr, const LinphoneEventLog
ChatConversationView *view = (__bridge ChatConversationView *)linphone_chat_room_cbs_get_user_data(linphone_chat_room_get_current_callbacks(cr));
[view.tableController addEventEntry:(LinphoneEventLog *)event_log];
[view.tableController scrollToBottom:true];
if (IPAD)
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneMessageReceived object:view];
}
void on_chat_room_is_composing_received(LinphoneChatRoom *cr, const LinphoneAddress *remoteAddr, bool_t isComposing) {

View file

@ -920,13 +920,13 @@ static RootViewManager *rootViewManagerInstance = nil;
if (view.chatRoom && view.chatRoomCbs)
linphone_chat_room_remove_callbacks(view.chatRoom, view.chatRoomCbs);
if (PhoneMainView.instance.currentView == view.compositeViewDescription)
[PhoneMainView.instance popCurrentView];
view.chatRoomCbs = NULL;
view.chatRoom = cr;
self.currentRoom = view.chatRoom;
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
if (PhoneMainView.instance.currentView == view.compositeViewDescription)
[view viewWillAppear:TRUE];
else
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
void main_view_chat_room_state_changed(LinphoneChatRoom *cr, LinphoneChatRoomState newState) {