Remove extensions from model manager

This commit is contained in:
Mo Bitar
2017-10-08 22:19:41 -05:00
parent fe01df17f8
commit 265da4a58c

View File

@@ -27,7 +27,6 @@ export default class ModelManager {
this.itemSyncObservers = [];
this._extensions = [];
this.acceptableContentTypes = ["Note", "Tag", "SN|Theme"];
}
@@ -37,7 +36,6 @@ export default class ModelManager {
this.tags.length = 0;
this.themes.length = 0;
this.items.length = 0;
this._extensions.length = 0;
}
get allItems() {
@@ -46,12 +44,6 @@ export default class ModelManager {
})
}
get extensions() {
return this._extensions.filter(function(ext){
return !ext.deleted;
})
}
async alternateUUIDForItem(item) {
// we need to clone this item and give it a new uuid, then delete item with old uuid from db (you can't mofidy uuid's in our indexeddb setup)
var newItem = this.createItem(item);
@@ -189,10 +181,6 @@ export default class ModelManager {
if(!_.find(this.notes, {uuid: item.uuid})) {
this.notes.unshift(item);
}
} else if(item.content_type == "Extension") {
if(!_.find(this._extensions, {uuid: item.uuid})) {
this._extensions.unshift(item);
}
} else if(item.content_type == "SN|Theme") {
if(!_.find(this.themes, {uuid: item.uuid})) {
this.themes.unshift(item);
@@ -292,8 +280,6 @@ export default class ModelManager {
_.pull(this.tags, item);
} else if(item.content_type == "Note") {
this.notes = _.pull(this.notes, item);
} else if(item.content_type == "Extension") {
_.pull(this._extensions, item);
} else if(item.content_type == "SN|Theme") {
_.pull(this.themes, item);
}