Support deleted
property for collections and searches
This lays the groundwork for moving collections and searches to the trash instead of deleting them outright. We're not doing that yet, so the `deleted` property will never be set (except for items), but this will allow clients from this point forward to sync collections and searches with that property for when it's used in the future. For now, such objects will just be hidden from the collections pane as if they had been deleted.
This commit is contained in:
parent
5a4d78578b
commit
e45ca4edad
16 changed files with 346 additions and 136 deletions
|
@ -431,12 +431,12 @@ function createUnsavedDataObject(objectType, params = {}) {
|
|||
throw new Error("Object type not provided");
|
||||
}
|
||||
|
||||
var allowedParams = ['libraryID', 'parentID', 'parentKey', 'synced', 'version'];
|
||||
var allowedParams = ['libraryID', 'parentID', 'parentKey', 'synced', 'version', 'deleted'];
|
||||
|
||||
var itemType;
|
||||
if (objectType == 'item' || objectType == 'feedItem') {
|
||||
itemType = params.itemType || 'book';
|
||||
allowedParams.push('deleted', 'dateAdded', 'dateModified');
|
||||
allowedParams.push('dateAdded', 'dateModified');
|
||||
}
|
||||
if (objectType == 'item') {
|
||||
allowedParams.push('inPublications');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue