Skip to content

Commit

Permalink
[iOS][Cherry-pick] Fix Reading List promo corner after last item is r…
Browse files Browse the repository at this point in the history
…emoved

In the Reading List, the promo cell background rounded corners becomes
right angles when the last item is removed.

Changing the separator style while the cell is shown without reloading
seems to be the cause of the issue. This CL removes the separatorStyle
change which doesn't seem to affect the UI.

Video taken after the fix:
https://drive.google.com/file/d/1eGH6UZ4NXuutkNkyMOVWgRdPj5wSsgCG/view?usp=drive_link

(cherry picked from commit b6dd374)

Bug: 1441989
Change-Id: I07c55a625316e14958f0e51b24bbf6dc8f739bd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4556332
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Commit-Queue: Menghan Yang <myuu@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1148523}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4567944
Cr-Commit-Position: refs/branch-heads/5790@{#127}
Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
  • Loading branch information
Menghan YANG authored and Chromium LUCI CQ committed May 30, 2023
1 parent 3fe845b commit c308e5c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,11 @@ - (void)viewDidLoad {
self.dragDropHandler.dragDataSource = self;
self.tableView.dragDelegate = self.dragDropHandler;
self.tableView.dragInteractionEnabled = true;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// In case the sign-in promo visibility is changed before the first layout,
// we need to refresh the empty view margin after the layout is done, to apply
// the correct top margin value according to the promo view's height.
Expand Down Expand Up @@ -1139,7 +1141,6 @@ - (void)tableIsNotEmpty {
[self loadItems];
[self.audience readingListHasItems:YES];
self.tableView.alwaysBounceVertical = YES;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
[self removeEmptyTableView];
}

Expand All @@ -1160,7 +1161,6 @@ - (void)tableIsEmpty {
self.navigationItem.largeTitleDisplayMode =
UINavigationItemLargeTitleDisplayModeNever;
self.tableView.alwaysBounceVertical = NO;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.audience readingListHasItems:NO];
[self updateEmptyViewTopMargin];
}
Expand Down

0 comments on commit c308e5c

Please sign in to comment.