Commit a300366a authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Remove RL VC delayed update on editing.

This does not work well with multiwindow.

Bug: 1106759
Change-Id: Idc2140577d9616babc82b0100ae544641a241ec6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309701
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791159}
parent 4d87cfad
......@@ -74,8 +74,6 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
@property(nonatomic, readonly)
TableViewModel<TableViewItem<ReadingListListItem>*>* tableViewModel;
// Whether the data source has been modified while in editing mode.
@property(nonatomic, assign) BOOL dataSourceModifiedWhileEditing;
// The toolbar button manager.
@property(nonatomic, strong) ReadingListToolbarButtonManager* toolbarManager;
// The number of read and unread cells that are currently selected.
......@@ -102,7 +100,6 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
@synthesize dataSource = _dataSource;
@synthesize browser = _browser;
@dynamic tableViewModel;
@synthesize dataSourceModifiedWhileEditing = _dataSourceModifiedWhileEditing;
@synthesize toolbarManager = _toolbarManager;
@synthesize selectedUnreadItemCount = _selectedUnreadItemCount;
@synthesize selectedReadItemCount = _selectedReadItemCount;
......@@ -330,7 +327,6 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
- (void)loadModel {
[super loadModel];
self.dataSourceModifiedWhileEditing = NO;
if (self.dataSource.hasElements) {
[self loadItems];
......@@ -350,13 +346,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
}
- (void)dataSourceChanged {
// If we are editing and monitoring the model updates, set a flag to reload
// the data at the end of the editing.
if (self.editing) {
self.dataSourceModifiedWhileEditing = YES;
} else {
[self reloadData];
}
}
- (NSArray<id<ReadingListListItem>>*)readItems {
......@@ -887,9 +877,6 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
// Cleanup function called in the completion block of editing operations.
- (void)batchEditDidFinish {
// Reload the items if the datasource was modified during the edit.
if (self.dataSourceModifiedWhileEditing)
[self reloadData];
// Remove any newly emptied sections.
[self removeEmptySections];
}
......
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