Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1915)

Unified Diff: chrome/browser/resources/md_bookmarks/command_manager.js

Issue 2946203002: MD Bookmarks: Batch updates to the UI when processing deletes and moves (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_bookmarks/command_manager.js
diff --git a/chrome/browser/resources/md_bookmarks/command_manager.js b/chrome/browser/resources/md_bookmarks/command_manager.js
index 20c90a8353f4fdabd8113f8471125edd6371a15e..6eb7ac433bd9371ed0572c00913f0dc7f8db9e3d 100644
--- a/chrome/browser/resources/md_bookmarks/command_manager.js
+++ b/chrome/browser/resources/md_bookmarks/command_manager.js
@@ -216,7 +216,10 @@ cr.define('bookmarks', function() {
var title = state.nodes[idList[0]].title;
var labelPromise = cr.sendWithPromise(
'getPluralString', 'toastItemsDeleted', idList.length);
+ var store = bookmarks.Store.getInstance();
+ store.beginBatchUpdate();
chrome.bookmarkManagerPrivate.removeTrees(idList, function() {
+ store.endBatchUpdate();
labelPromise.then(function(label) {
var pieces = loadTimeData.getSubstitutedStringPieces(label, title)
.map(function(p) {

Powered by Google App Engine
This is Rietveld 408576698