mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-21 07:46:06 +08:00
[client-sync] Wrap more syncWorker args
Turns out the SyncWorker isn't the only one who initiates SyncTasks
This commit is contained in:
parent
ae2e2122e9
commit
af6e6e669a
|
@ -52,7 +52,7 @@ async function* saveSentMessage({db, account, syncWorker, logger, imap, provider
|
|||
account,
|
||||
folder: sentFolder,
|
||||
})
|
||||
yield syncOperation.run(db, imap, syncWorker)
|
||||
yield syncOperation.run(db, imap, {syncWorker})
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ async function* saveSentMessage({db, account, syncWorker, logger, imap, provider
|
|||
account,
|
||||
folder: allMailFolder,
|
||||
})
|
||||
yield syncOperation.run(db, imap, syncWorker)
|
||||
yield syncOperation.run(db, imap, {syncWorker})
|
||||
}
|
||||
|
||||
async function* setThreadingReferences(db, baseMessage) {
|
||||
|
|
|
@ -55,7 +55,7 @@ class MoveThreadToFolderIMAP extends SyncbackIMAPTask {
|
|||
account: this._account,
|
||||
folder: targetFolder,
|
||||
})
|
||||
yield syncOperation.run(db, imap, syncWorker)
|
||||
yield syncOperation.run(db, imap, {syncWorker})
|
||||
}
|
||||
}
|
||||
module.exports = MoveThreadToFolderIMAP
|
||||
|
|
|
@ -60,7 +60,7 @@ class SetThreadFolderAndLabelsIMAP extends SyncbackIMAPTask {
|
|||
account: this._account,
|
||||
folder: targetFolder,
|
||||
})
|
||||
yield syncOperation.run(db, imap, syncWorker)
|
||||
yield syncOperation.run(db, imap, {syncWorker})
|
||||
}
|
||||
}
|
||||
module.exports = SetThreadFolderAndLabelsIMAP
|
||||
|
|
|
@ -47,7 +47,7 @@ class SyncUnknownUIDs extends SyncbackIMAPTask {
|
|||
uids: uidsToSync,
|
||||
});
|
||||
this._syncOperation.on('message-processed', () => this.onMessageProcessed());
|
||||
yield this._syncOperation.run(db, imap, syncWorker)
|
||||
yield this._syncOperation.run(db, imap, {syncWorker})
|
||||
this._syncOperation.removeAllListeners('message-processed');
|
||||
|
||||
if (yield this._isCancelled()) {
|
||||
|
|
Loading…
Reference in a new issue