mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 06:06:57 +02:00
Directory server list: Add detail text for homeserver selection
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#import "DirectoryServerPickerViewController.h"
|
||||
#import "DirectoryServerTableViewCell.h"
|
||||
#import "DirectoryServerDetailTableViewCell.h"
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@@ -86,6 +87,7 @@
|
||||
|
||||
// Register view cell class
|
||||
[self.tableView registerClass:DirectoryServerTableViewCell.class forCellReuseIdentifier:DirectoryServerTableViewCell.defaultReuseIdentifier];
|
||||
[self.tableView registerClass:DirectoryServerDetailTableViewCell.class forCellReuseIdentifier:DirectoryServerDetailTableViewCell.defaultReuseIdentifier];
|
||||
|
||||
// Add a cancel button
|
||||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onCancel:)];
|
||||
@@ -148,11 +150,23 @@
|
||||
|
||||
- (Class<MXKCellRendering>)cellViewClassForCellData:(MXKCellData*)cellData
|
||||
{
|
||||
id<MXKDirectoryServerCellDataStoring> directoryCellData = (id<MXKDirectoryServerCellDataStoring>)cellData;
|
||||
|
||||
if (directoryCellData.homeserver)
|
||||
{
|
||||
return DirectoryServerDetailTableViewCell.class;
|
||||
}
|
||||
return DirectoryServerTableViewCell.class;
|
||||
}
|
||||
|
||||
- (NSString *)cellReuseIdentifierForCellData:(MXKCellData*)cellData
|
||||
{
|
||||
id<MXKDirectoryServerCellDataStoring> directoryCellData = (id<MXKDirectoryServerCellDataStoring>)cellData;
|
||||
|
||||
if (directoryCellData.homeserver)
|
||||
{
|
||||
return DirectoryServerDetailTableViewCell.defaultReuseIdentifier;
|
||||
}
|
||||
return DirectoryServerTableViewCell.defaultReuseIdentifier;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user