mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 05:36:57 +02:00
Public rooms search: Directory page starts to work (with cells from MatrixKit)
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#import "PublicRoomsDirectoryDataSource.h"
|
||||
|
||||
#import "MXKPublicRoomTableViewCell.h"
|
||||
|
||||
#pragma mark - Constants definitions
|
||||
|
||||
// Time in seconds from which public rooms data is considered as obsolete
|
||||
@@ -124,4 +126,26 @@ double const kPublicRoomsDirectoryDataExpiration = 10;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return _filteredRooms.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
// For now reuse MatrixKit cells
|
||||
// TODO: use custom cells and manage a mechanism a la MatrixKit with cellData
|
||||
MXKPublicRoomTableViewCell *publicRoomCell = [tableView dequeueReusableCellWithIdentifier:[MXKPublicRoomTableViewCell defaultReuseIdentifier]];
|
||||
if (!publicRoomCell)
|
||||
{
|
||||
publicRoomCell = [[MXKPublicRoomTableViewCell alloc] init];
|
||||
}
|
||||
|
||||
[publicRoomCell render:_filteredRooms[indexPath.row]];
|
||||
|
||||
return publicRoomCell;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user