fix ipad's ui

This commit is contained in:
Benjamin Reis 2018-02-28 15:11:24 +01:00
parent ad87830768
commit 97bf8e988d
2 changed files with 13 additions and 10 deletions

View file

@ -60,6 +60,7 @@
@property (weak, nonatomic) IBOutlet UIIconButton *infoButton;
@property (weak, nonatomic) IBOutlet UILabel *particpantsLabel;
- (void)configureForRoom:(BOOL)editing;
- (IBAction)onBackClick:(id)event;
- (IBAction)onEditClick:(id)event;
- (IBAction)onMessageChange:(id)sender;

View file

@ -157,17 +157,19 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
if (![self isEditing]) {
LinphoneChatRoom *chatRoom = (LinphoneChatRoom *)bctbx_list_nth_data(_data, (int)[indexPath row]);
ChatConversationView *view = VIEW(ChatConversationView);
view.chatRoom = chatRoom;
// on iPad, force unread bubble to disappear by reloading the cell
if (IPAD) {
UIChatCell *cell = (UIChatCell *)[tableView cellForRowAtIndexPath:indexPath];
[cell updateUnreadBadge];
}
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
if ([self isEditing])
return;
LinphoneChatRoom *chatRoom = (LinphoneChatRoom *)bctbx_list_nth_data(_data, (int)[indexPath row]);
ChatConversationView *view = VIEW(ChatConversationView);
view.chatRoom = chatRoom;
// on iPad, force unread bubble to disappear by reloading the cell
if (IPAD) {
UIChatCell *cell = (UIChatCell *)[tableView cellForRowAtIndexPath:indexPath];
[cell updateUnreadBadge];
[view configureForRoom:false];
}
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
void deletion_chat_room_state_changed(LinphoneChatRoom *cr, LinphoneChatRoomState newState) {