Added search functionality for rooms and people, fixed bug of dismmisal

This commit is contained in:
Aram Sargsyan
2017-08-11 20:33:50 +04:00
parent 89592fd34c
commit ef2e38b63f
5 changed files with 71 additions and 7 deletions
@@ -8,6 +8,7 @@
#import "ShareRecentsDataSource.h"
#import "RoomTableViewCell.h"
#import "RecentCellData.h"
@interface ShareRecentsDataSource ()
@@ -25,13 +26,14 @@
self = [super initWithMatrixSession:mxSession];
if (self)
{
self.dataSourceMode = dataSourceMode;
_recentRooms = [NSMutableArray array];
_recentPeople = [NSMutableArray array];
self.dataSourceMode = dataSourceMode;
}
return self;
}
#pragma mark - Private
- (void)updateArrays
@@ -66,6 +68,11 @@
#pragma mark - MXKRecentsDataSource
- (Class)cellDataClassForCellIdentifier:(NSString *)identifier
{
return RecentCellData.class;
}
- (id<MXKRecentCellDataStoring>)cellDataAtIndexPath:(NSIndexPath *)indexPath
{
id<MXKRecentCellDataStoring> cellData = nil;
@@ -85,8 +92,8 @@
- (void)dataSource:(MXKDataSource*)dataSource didCellChange:(id)changes
{
[super dataSource:dataSource didCellChange:changes];
[self updateArrays];
[self updateArrays];
[self.delegate dataSource:self didCellChange:changes];
}
@@ -125,4 +132,5 @@
return cell;
}
@end