chat list rm

This commit is contained in:
Gautier Pelloux-Prayer 2015-09-30 14:08:40 +02:00
parent f81fa18ef0
commit 43e5ea36c3
2 changed files with 11 additions and 9 deletions

View file

@ -19,9 +19,9 @@
#import <UIKit/UIKit.h>
#include "linphone/linphonecore.h"
#include "UICheckBoxTVTableViewController.h"
@interface ChatsListTableView : UITableViewController {
}
@interface ChatsListTableView : UICheckBoxTVTableViewController
- (void)loadData;
@end

View file

@ -103,7 +103,7 @@ static void chatTable_free_chatrooms(void *data) {
ms_list_free_with_data(data, chatTable_free_chatrooms);
}
data = [self sortChatRooms];
[[self tableView] reloadData];
[super loadData];
}
#pragma mark - UITableViewDataSource Functions
@ -124,18 +124,20 @@ static void chatTable_free_chatrooms(void *data) {
}
[cell setChatRoom:(LinphoneChatRoom *)ms_list_nth_data(data, (int)[indexPath row])];
[super accessoryForCell:cell atPath:indexPath];
return cell;
}
#pragma mark - UITableViewDelegate Functions
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:NO];
LinphoneChatRoom *chatRoom = (LinphoneChatRoom *)ms_list_nth_data(data, (int)[indexPath row]);
ChatConversationView *view = VIEW(ChatConversationView);
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE];
[view setChatRoom:chatRoom];
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
if (![self isEditing]) {
LinphoneChatRoom *chatRoom = (LinphoneChatRoom *)ms_list_nth_data(data, (int)[indexPath row]);
ChatConversationView *view = VIEW(ChatConversationView);
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE];
[view setChatRoom:chatRoom];
}
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)aTableView