Index: chrome/browser/resources/md_bookmarks/dnd_manager.js |
diff --git a/chrome/browser/resources/md_bookmarks/dnd_manager.js b/chrome/browser/resources/md_bookmarks/dnd_manager.js |
index 71b1bcde1da76d1ec6d9c480ed6bf02d73021274..f742ad9de40f4a32e90bec173578e43d89ea7cb2 100644 |
--- a/chrome/browser/resources/md_bookmarks/dnd_manager.js |
+++ b/chrome/browser/resources/md_bookmarks/dnd_manager.js |
@@ -336,10 +336,13 @@ cr.define('bookmarks', function() { |
e.preventDefault(); |
var dropInfo = this.calculateDropInfo_(this.dropDestination_); |
- if (dropInfo.index != -1) |
- chrome.bookmarkManagerPrivate.drop(dropInfo.parentId, dropInfo.index); |
- else |
- chrome.bookmarkManagerPrivate.drop(dropInfo.parentId); |
+ var index = dropInfo.index != -1 ? dropInfo.index : undefined; |
+ var store = bookmarks.Store.getInstance(); |
+ store.beginBatchUpdate(); |
+ chrome.bookmarkManagerPrivate.drop( |
calamity
2017/06/22 05:48:27
This works within the BMM, but moving a folder in
tsergeant
2017/06/23 00:20:20
Hmmm, good idea, but I'm not sure that this is pos
calamity
2017/06/26 03:17:24
Hmm. How about just batching in api_listener.js? H
tsergeant
2017/06/27 07:35:53
Done. As discussed, I setTimeout seems to work rel
|
+ dropInfo.parentId, index, function() { |
+ store.endBatchUpdate(); |
+ }); |
} |
this.dropDestination_ = null; |