mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 10:12:00 +08:00
Emit transaction deltas when transaction is committed
This commit is contained in:
parent
a81cf69f7e
commit
15f8864008
2 changed files with 8 additions and 5 deletions
|
@ -279,8 +279,8 @@ export default class MailsyncBridge {
|
|||
continue;
|
||||
}
|
||||
|
||||
const {type, objects, objectClass} = JSON.parse(msg);
|
||||
if (!objects || !type || !objectClass) {
|
||||
const {type, modelJSONs, modelClass} = JSON.parse(msg);
|
||||
if (!modelJSONs || !type || !modelClass) {
|
||||
console.log(`Sync worker sent a JSON formatted message with unexpected keys: ${msg}`)
|
||||
continue;
|
||||
}
|
||||
|
@ -288,8 +288,11 @@ export default class MailsyncBridge {
|
|||
// dispatch the message to other windows
|
||||
ipcRenderer.send('mailsync-bridge-rebroadcast-to-all', msg);
|
||||
|
||||
const models = objects.map(Utils.convertToModel);
|
||||
this._onIncomingChangeRecord(new DatabaseChangeRecord({type, objectClass, objects: models}));
|
||||
const models = modelJSONs.map(Utils.convertToModel);
|
||||
this._onIncomingChangeRecord(new DatabaseChangeRecord({
|
||||
type, // TODO BG move to "model" naming style, finding all uses might be tricky
|
||||
objectClass: modelClass,
|
||||
objects: models}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
mailsync
2
mailsync
|
@ -1 +1 @@
|
|||
Subproject commit 535c875507bdb5fba089c18cfcac9c564a0b8da1
|
||||
Subproject commit 8201244c343978d5118f38a4309582189a0d9188
|
Loading…
Reference in a new issue