dbmanager delete item
This commit is contained in:
@@ -519,7 +519,7 @@ angular.module('app.frontend')
|
||||
|
||||
this.writeItemsToLocalStorage = function(items, callback) {
|
||||
var params = items.map(function(item) {
|
||||
return this.paramsForItem(item, this.isUserSignedIn(), ["created_at", "updated_at", "presentation_url"], false)
|
||||
return this.paramsForItem(item, this.isUserSignedIn(), ["created_at", "updated_at", "presentation_url", "dirty"], false)
|
||||
}.bind(this));
|
||||
|
||||
dbManager.saveItems(params, callback);
|
||||
|
||||
@@ -155,7 +155,7 @@ class ExtensionManager {
|
||||
}.bind(this))
|
||||
|
||||
} else {
|
||||
params.item = this.outgoingParamsForItem(item, extension);
|
||||
params.items = [this.outgoingParamsForItem(item, extension)];
|
||||
}
|
||||
|
||||
this.performPost(action, extension, params, function(response){
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class ModelManager {
|
||||
|
||||
constructor() {
|
||||
constructor(dbManager) {
|
||||
this.dbManager = dbManager;
|
||||
this.notes = [];
|
||||
this.tags = [];
|
||||
this.itemSyncObservers = [];
|
||||
@@ -217,6 +218,8 @@ class ModelManager {
|
||||
} else if(item.content_type == "Extension") {
|
||||
_.pull(this._extensions, item);
|
||||
}
|
||||
|
||||
this.dbManager.deleteItem(item);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user