mirror of
https://github.com/zotero/zotero.git
synced 2026-09-26 01:11:23 +00:00
Speed up renaming of colored tags
This commit is contained in:
parent
6a2611c9c6
commit
3829f12603
1 changed files with 12 additions and 10 deletions
|
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue