MXKDataSource refactoring

Table view cell are now defined at view controller level.
This commit is contained in:
giomfo
2015-12-07 11:50:13 +01:00
parent 5d484d9a63
commit ef69af9adb
5 changed files with 52 additions and 22 deletions
-12
View File
@@ -18,8 +18,6 @@
#import "EventFormatter.h"
#import "RoomBubbleCellData.h"
#import "RoomIncomingBubbleTableViewCell.h"
#import "RoomOutgoingBubbleTableViewCell.h"
@implementation RoomDataSource
@@ -31,16 +29,6 @@
// Replace default Cell data class
[self registerCellDataClass:RoomBubbleCellData.class forCellIdentifier:kMXKRoomBubbleCellDataIdentifier];
// Replace cell view classes
[self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingTextMsgCellIdentifier];
[self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingTextMsgHiddenSenderCellIdentifier];
[self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingAttachmentCellIdentifier];
[self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingAttachmentHiddenSenderCellIdentifier];
[self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingTextMsgCellIdentifier];
[self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingTextMsgHiddenSenderCellIdentifier];
[self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingAttachmentCellIdentifier];
[self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingAttachmentHiddenSenderCellIdentifier];
// Replace event formatter
self.eventFormatter = [[EventFormatter alloc] initWithMatrixSession:self.mxSession];