[ios] Fixes HistoryInserter item insertion index.
Fixes a TableVIew model inconsistency crash. Whenever an item was inserted somewhere other than the end of the model, a crash occurred. Example: If the item was inserted second to last at index 9, then the tableViewDidInsert value was also 9. This meant that tableViewDidInsert was called twice (once for the item just inserted and once for the previous item) and that the item that used to be at 9 shifted to 10. The problem is that tableViewDidInsert was never called for index10. This was causing an inconsistency crash at the end of tableUpdates. Now we always call tableViewDidInsert with the total count of items, in order to successfully let the tableView a new row as been inserted. Bug: 836562 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: I3705cf6bd78364f04f99f29393695c1b00d613bd Reviewed-on: https://chromium-review.googlesource.com/1121792 Commit-Queue: Sergio Collazos <sczs@chromium.org> Reviewed-by:Rohit Rao <rohitrao@chromium.org> Cr-Commit-Position: refs/heads/master@{#571942}
Showing
Please register or sign in to comment