insert tags by sorted titles
This commit is contained in:
@@ -117,7 +117,7 @@ class ModelManager {
|
||||
items.forEach(function(item){
|
||||
if(item.content_type == "Tag") {
|
||||
if(!_.find(this.tags, {uuid: item.uuid})) {
|
||||
this.tags.unshift(item);
|
||||
this.tags.splice(_.sortedIndexBy(this.tags, item, 'title'), 0, item);
|
||||
}
|
||||
} else if(item.content_type == "Note") {
|
||||
if(!_.find(this.notes, {uuid: item.uuid})) {
|
||||
@@ -128,7 +128,7 @@ class ModelManager {
|
||||
this._extensions.unshift(item);
|
||||
}
|
||||
}
|
||||
}.bind(this))
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
addItem(item) {
|
||||
|
||||
Reference in New Issue
Block a user