1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Electron, Mobile: Created alarm service and drivers

This commit is contained in:
Laurent Cozic
2017-11-27 22:50:46 +00:00
parent 748acdf03f
commit 9a40851c77
26 changed files with 367 additions and 85 deletions

View File

@ -419,8 +419,20 @@ class Synchronizer {
}
content = await BaseItem.unserialize(content);
let ItemClass = BaseItem.itemClass(content);
content = ItemClass.filter(content);
let newContent = null;
if (action === 'createLocal') {
newContent = Object.assign({}, content);
} else if (action === 'updateLocal') {
newContent = BaseModel.diffObjects(local, content);
newContent.type_ = content.type_;
newContent.id = content.id;
} else {
throw new Error('Unknown action: ' + action);
}
let newContent = Object.assign({}, content);
let options = {
autoTimestamp: false,
nextQueries: BaseItem.updateSyncTimeQueries(syncTargetId, newContent, time.unixMs()),