Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble-iphoneos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2017-09-03 20:39:53 +0300
committerGitHub <noreply@github.com>2017-09-03 20:39:53 +0300
commit09dd0f98da7884abcb0a714976bfbff897c2462b (patch)
treef0e924137a57abf7931c72c1eb90594e5d83b41b
parentf7c9fcdb00629735b984b26346a42c1826663122 (diff)
parent01ac79d7a368bcc46656380f7f5fc8e1853a49e0 (diff)
Merge PR #117: MUCertificateViewController: avoid fancy newline formatting of cert digests.
-rw-r--r--Source/Classes/MUCertificateViewController.m22
1 files changed, 5 insertions, 17 deletions
diff --git a/Source/Classes/MUCertificateViewController.m b/Source/Classes/MUCertificateViewController.m
index 354bdaf..3809b6d 100644
--- a/Source/Classes/MUCertificateViewController.m
+++ b/Source/Classes/MUCertificateViewController.m
@@ -88,6 +88,9 @@ static const NSUInteger CertificateViewSectionTotal = 4;
- (void) viewDidLoad {
[self setTitle:_certTitle];
+
+ [[self tableView] setRowHeight:UITableViewAutomaticDimension];
+ [[self tableView] setEstimatedRowHeight:44.0f];
}
- (void) viewWillAppear:(BOOL)animated {
@@ -285,9 +288,7 @@ static const NSUInteger CertificateViewSectionTotal = 4;
MKCertificate *cert = [_certificates objectAtIndex:_curIdx];
NSString *hexDigest = [cert hexDigestOfKind:@"sha1"];
if ([indexPath row] == 0 && hexDigest.length == 40) {
- cell.textLabel.text = [NSString stringWithFormat:@"%@\n%@",
- [MUCertificateController fingerprintFromHexString:[hexDigest substringToIndex:20]],
- [MUCertificateController fingerprintFromHexString:[hexDigest substringFromIndex:20]]];
+ cell.textLabel.text = hexDigest;
cell.textLabel.textColor = [MUColor selectedTextColor];
cell.textLabel.font = [UIFont fontWithName:@"Courier" size:16];
cell.textLabel.numberOfLines = 0;
@@ -298,11 +299,7 @@ static const NSUInteger CertificateViewSectionTotal = 4;
MKCertificate *cert = [_certificates objectAtIndex:_curIdx];
NSString *hexDigest = [cert hexDigestOfKind:@"sha256"];
if ([indexPath row] == 0 && hexDigest.length == 64) {
- cell.textLabel.text = [NSString stringWithFormat:@"%@\n%@\n%@\n%@",
- [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(0, 20)]],
- [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(20, 20)]],
- [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(40, 20)]],
- [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(60, 4)]]];
+ cell.textLabel.text = hexDigest;
cell.textLabel.textColor = [MUColor selectedTextColor];
cell.textLabel.font = [UIFont fontWithName:@"Courier" size:16];
cell.textLabel.numberOfLines = 0;
@@ -327,15 +324,6 @@ static const NSUInteger CertificateViewSectionTotal = 4;
return cell;
}
-- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- if ([indexPath section] == CertificateViewSectionSHA1Fingerprint) {
- return 55.0f;
- } else if ([indexPath section] == CertificateViewSectionSHA256Fingerprint) {
- return 88.0f;
- }
- return 44.0f;
-}
-
#pragma mark -
#pragma mark Table view delegate