Commit 264c7e42 authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

[IOS][Language] Language Settings - Refresh cell heights in edit mode

Fixes a bug where the leading language labels were being cut off because
the cells were not adapting their heights in edit mode.

Bug: 957688,967658
Change-Id: I6f8abab90b77565c71dcedc9cc4648a433ec324c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635933Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664622}
parent 0643a144
...@@ -149,6 +149,12 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -149,6 +149,12 @@ typedef NS_ENUM(NSInteger, ItemType) {
- (void)updateUIForEditState { - (void)updateUIForEditState {
[super updateUIForEditState]; [super updateUIForEditState];
// The following two lines cause the table view to refresh the cell heights
// with animation without reloading the cells. This is needed for language
// cells that can be significantly taller in edit mode.
[self.tableView beginUpdates];
[self.tableView endUpdates];
[self setAddLanguageItemEnabled:!self.isEditing]; [self setAddLanguageItemEnabled:!self.isEditing];
[self setTranslateSwitchItemEnabled:!self.isEditing]; [self setTranslateSwitchItemEnabled:!self.isEditing];
} }
......
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