mirror of
https://github.com/standardnotes/mobile.git
synced 2026-04-29 02:12:40 -04:00
Remove extensions from model manager
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user