Speed up renaming of colored tags

This commit is contained in:
Dan Stillman 2019-03-30 10:35:03 -04:00
parent 6a2611c9c6
commit 3829f12603

View file

@ -290,16 +290,18 @@ Zotero.Tags = new function() {
}.bind(this));
if (oldColorData) {
// Remove color from old tag
yield this.setColor(libraryID, oldName);
// Add color to new tag
yield this.setColor(
libraryID,
newName,
oldColorData.color,
oldColorData.position
);
yield Zotero.DB.executeTransaction(function* () {
// Remove color from old tag
yield this.setColor(libraryID, oldName);
// Add color to new tag
yield this.setColor(
libraryID,
newName,
oldColorData.color,
oldColorData.position
);
}.bind(this));
}
});