Commit 73a2b8b6 authored by Kurt Horimoto's avatar Kurt Horimoto Committed by Commit Bot

[iOS] Use automatic table view row animation for edits.

This CL updates the reading list table view edit animations from using
UITableViewRowAnimationFade to using UITableViewRowAnimationAutomatic.

Bug: 862172
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ia6cdb098dcf7f454a782adb820b9e0f665a54acb
Reviewed-on: https://chromium-review.googlesource.com/1132420
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575087}
parent 5046449d
...@@ -388,7 +388,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts( ...@@ -388,7 +388,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
NSInteger sectionIndex = NSInteger sectionIndex =
[model sectionForSectionIdentifier:SectionIdentifierRead]; [model sectionForSectionIdentifier:SectionIdentifierRead];
[tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] [tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex]
withRowAnimation:UITableViewRowAnimationFade]; withRowAnimation:UITableViewRowAnimationAutomatic];
[model removeSectionWithIdentifier:SectionIdentifierRead]; [model removeSectionWithIdentifier:SectionIdentifierRead];
}; };
void (^completion)(BOOL) = ^(BOOL) { void (^completion)(BOOL) = ^(BOOL) {
...@@ -688,7 +688,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts( ...@@ -688,7 +688,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
[model setHeader:[self headerForSection:sectionID] [model setHeader:[self headerForSection:sectionID]
forSectionWithIdentifier:sectionID]; forSectionWithIdentifier:sectionID];
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] [self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex]
withRowAnimation:UITableViewRowAnimationFade]; withRowAnimation:UITableViewRowAnimationAutomatic];
}; };
[self performBatchTableViewUpdates:updates completion:nil]; [self performBatchTableViewUpdates:updates completion:nil];
...@@ -719,7 +719,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts( ...@@ -719,7 +719,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
[self deleteItemAtIndexPathFromModel:indexPath]; [self deleteItemAtIndexPathFromModel:indexPath];
} }
[tableView deleteRowsAtIndexPaths:indexPaths [tableView deleteRowsAtIndexPaths:indexPaths
withRowAnimation:UITableViewRowAnimationFade]; withRowAnimation:UITableViewRowAnimationAutomatic];
}; };
void (^completion)(BOOL) = ^(BOOL) { void (^completion)(BOOL) = ^(BOOL) {
[self batchEditDidFinish]; [self batchEditDidFinish];
...@@ -806,7 +806,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts( ...@@ -806,7 +806,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
// view. // view.
NSInteger sectionIndex = [model sectionForSectionIdentifier:section]; NSInteger sectionIndex = [model sectionForSectionIdentifier:section];
[tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] [tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex]
withRowAnimation:UITableViewRowAnimationFade]; withRowAnimation:UITableViewRowAnimationAutomatic];
[model removeSectionWithIdentifier:section]; [model removeSectionWithIdentifier:section];
} }
} }
......
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