Index: ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm |
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm b/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm |
index 1493aa7d09d04cbc5e3acf0a93cc67ec603b3f07..5bba8cf291206986d11db496114415d893d015c1 100644 |
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm |
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm |
@@ -564,20 +564,25 @@ initWithPopupView:(OmniboxPopupViewIOS*)view |
size_t size = _currentResult.size(); |
[self.tableView reloadData]; |
- [self.tableView beginUpdates]; |
- for (size_t i = 0; i < kRowCount; i++) { |
- OmniboxPopupMaterialRow* row = _rows[i]; |
- if (i < size) { |
- const AutocompleteMatch& match = |
- ((const AutocompleteResult&)_currentResult).match_at((NSUInteger)i); |
- [self updateRow:row withMatch:match]; |
- row.hidden = NO; |
- } else { |
- row.hidden = YES; |
+ // We animate the rows ourselves in -fadeInRows, so make sure the table view |
+ // doens't try to apply it's own animation. |
rohitrao (ping after 24h)
2017/06/14 16:47:03
doesn't and its.
|
+ [UIView performWithoutAnimation:^{ |
+ [self.tableView beginUpdates]; |
+ for (size_t i = 0; i < kRowCount; i++) { |
+ OmniboxPopupMaterialRow* row = _rows[i]; |
+ |
+ if (i < size) { |
+ const AutocompleteMatch& match = |
+ ((const AutocompleteResult&)_currentResult).match_at((NSUInteger)i); |
+ [self updateRow:row withMatch:match]; |
+ row.hidden = NO; |
+ } else { |
+ row.hidden = YES; |
+ } |
} |
- } |
- [self.tableView endUpdates]; |
+ [self.tableView endUpdates]; |
+ }]; |
if (IsIPadIdiom()) |
[self updateContentInsetForKeyboard]; |
@@ -656,10 +661,7 @@ initWithPopupView:(OmniboxPopupViewIOS*)view |
#pragma mark UIScrollViewDelegate |
- (void)scrollViewDidScroll:(UIScrollView*)scrollView { |
- // Setting the top inset of the scrollView to |kTopAndBottomPadding| causes a |
- // one time scrollViewDidScroll to |-kTopAndBottomPadding|. It's easier to |
- // just ignore this one scroll tick. |
- if (scrollView.contentOffset.y == 0 - kTopAndBottomPadding) |
+ if (!scrollView.dragging) |
rohitrao (ping after 24h)
2017/06/14 16:47:03
Please add a comment here explaining why we need t
|
return; |
_popupView->DidScroll(); |