Skip to content

Commit cf83812

Browse files
committed
Merge branch 'token-type'
2 parents 8d341af + a71c2e4 commit cf83812

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

Authenticator/Classes/OTPTokenEntryViewController.m

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
} OTPTokenEntrySection;
3737

3838
typedef enum : NSUInteger {
39-
OTPTokenEntryBasicRowType,
4039
OTPTokenEntryBasicRowIssuer,
4140
OTPTokenEntryBasicRowName,
4241
OTPTokenEntryBasicRowSecret,
4342
OTPNumberOfTokenEntryBasicRows,
4443
} OTPTokenEntryBasicRow;
4544

4645
typedef enum : NSUInteger {
46+
OTPTokenEntryAdvancedRowType,
4747
OTPTokenEntryAdvancedRowDigits,
4848
OTPTokenEntryAdvancedRowAlgorithm,
4949
OTPNumberOfTokenEntryAdvancedRows,
@@ -72,12 +72,12 @@ @interface OTPTokenEntryViewController ()
7272

7373
@property (nonatomic, strong) UIBarButtonItem *doneButtonItem;
7474

75-
@property (nonatomic, strong) OTPSegmentedControlCell *tokenTypeCell;
7675
@property (nonatomic, strong) OTPTextFieldCell *issuerCell;
7776
@property (nonatomic, strong) OTPTextFieldCell *accountNameCell;
7877
@property (nonatomic, strong) OTPTextFieldCell *secretKeyCell;
7978

8079
@property (nonatomic) BOOL showsAdvancedOptions;
80+
@property (nonatomic, strong) OTPSegmentedControlCell *tokenTypeCell;
8181
@property (nonatomic, strong) OTPSegmentedControlCell *digitCountCell;
8282
@property (nonatomic, strong) OTPSegmentedControlCell *algorithmCell;
8383

@@ -191,8 +191,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
191191
switch (indexPath.section) {
192192
case OTPTokenEntrySectionBasic:
193193
switch (indexPath.row) {
194-
case OTPTokenEntryBasicRowType:
195-
return self.tokenTypeCell;
196194
case OTPTokenEntryBasicRowIssuer:
197195
return self.issuerCell;
198196
case OTPTokenEntryBasicRowName:
@@ -203,6 +201,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
203201
break;
204202
case OTPTokenEntrySectionAdvanced:
205203
switch (indexPath.row) {
204+
case OTPTokenEntryAdvancedRowType:
205+
return self.tokenTypeCell;
206206
case OTPTokenEntryAdvancedRowDigits:
207207
return self.digitCountCell;
208208
case OTPTokenEntryAdvancedRowAlgorithm:
@@ -217,22 +217,9 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
217217
{
218218
switch (indexPath.section) {
219219
case OTPTokenEntrySectionBasic:
220-
switch (indexPath.row) {
221-
case OTPTokenEntryBasicRowType:
222-
return 44;
223-
case OTPTokenEntryBasicRowIssuer:
224-
case OTPTokenEntryBasicRowName:
225-
case OTPTokenEntryBasicRowSecret:
226-
return 74;
227-
}
228-
break;
220+
return 74;
229221
case OTPTokenEntrySectionAdvanced:
230-
switch (indexPath.row) {
231-
case OTPTokenEntryAdvancedRowDigits:
232-
case OTPTokenEntryAdvancedRowAlgorithm:
233-
return 54;
234-
}
235-
break;
222+
return 54;
236223
}
237224
return 0;
238225
}

0 commit comments

Comments
 (0)