Various changes

This commit is contained in:
Laurent Cozic committed 2017-06-11 22:11:14 +01:00
1 parent 5b9d50947c
commit 9cec2652e7
37 files changed
+1728 -270

No files matched your search

@@ -31,21 +31,21 @@ class NoteFolderService extends BaseService {
output = item;
if (isNew && type == 'note') return Note.updateGeolocation(item.id);
}).then(() => {
Registry.synchronizer().start();
// Registry.synchronizer().start();
return output;
});
}
static setField(type, itemId, fieldName, fieldValue, oldValue = undefined) {
// TODO: not really consistent as the promise will return 'null' while
// this.save will return the note or folder. Currently not used, and maybe not needed.
if (oldValue !== undefined && fieldValue === oldValue) return Promise.resolve();
// static setField(type, itemId, fieldName, fieldValue, oldValue = undefined) {
// // TODO: not really consistent as the promise will return 'null' while
// // this.save will return the note or folder. Currently not used, and maybe not needed.
// if (oldValue !== undefined && fieldValue === oldValue) return Promise.resolve();
let item = { id: itemId };
item[fieldName] = fieldValue;
let oldItem = { id: itemId };
return this.save(type, item, oldItem);
}
// let item = { id: itemId };
// item[fieldName] = fieldValue;
// let oldItem = { id: itemId };
// return this.save(type, item, oldItem);
// }
static openNoteList(folderId) {
return Note.previews(folderId).then((notes) => {