Commit 8fc03c86 authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Fixing "Add Account…" in unified consent signin panel

Issue introduced with crrev.com/c/1174543
The table view now contains only one section. So the "Add Account…"
cell is now part of the first section. The difference between
the "Add Account…" cell and the identity cells should be make with
item class.

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I3fabec71aa2caadc29c16bde819df712da56f0b1
Reviewed-on: https://chromium-review.googlesource.com/1183498Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584874}
parent ca518807
...@@ -63,9 +63,10 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -63,9 +63,10 @@ typedef NS_ENUM(NSInteger, ItemType) {
- (void)tableView:(UITableView*)tableView - (void)tableView:(UITableView*)tableView
didSelectRowAtIndexPath:(NSIndexPath*)indexPath { didSelectRowAtIndexPath:(NSIndexPath*)indexPath {
[self.tableView deselectRowAtIndexPath:indexPath animated:YES]; [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.section) { DCHECK_EQ(0, indexPath.section);
case 0: { ListItem* item = [self.tableViewModel itemAtIndexPath:indexPath];
ListItem* item = [self.tableViewModel itemAtIndexPath:indexPath]; switch ((ItemType)item.type) {
case IdentityItemType: {
IdentityChooserItem* identityChooserItem = IdentityChooserItem* identityChooserItem =
base::mac::ObjCCastStrict<IdentityChooserItem>(item); base::mac::ObjCCastStrict<IdentityChooserItem>(item);
DCHECK(identityChooserItem); DCHECK(identityChooserItem);
...@@ -74,8 +75,7 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -74,8 +75,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
didSelectIdentityWithGaiaID:identityChooserItem.gaiaID]; didSelectIdentityWithGaiaID:identityChooserItem.gaiaID];
break; break;
} }
case 1: case AddAccountItemType:
DCHECK_EQ(0, indexPath.row);
[self.presentationDelegate [self.presentationDelegate
identityChooserViewControllerDidTapOnAddAccount:self]; identityChooserViewControllerDidTapOnAddAccount:self];
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment