mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 02:03:07 +08:00
Fix syncback request object
This commit is contained in:
parent
8a53dca755
commit
cf87325c5d
2 changed files with 9 additions and 4 deletions
|
@ -131,12 +131,13 @@ class SyncWorker {
|
|||
}
|
||||
|
||||
runSyncbackTask(task) {
|
||||
const syncbackRequest = task.syncbackRequestObject()
|
||||
return this._conn.runOperation(task)
|
||||
.then(() => { task.syncbackRequest.status = "SUCCEEDED" })
|
||||
.then(() => { syncbackRequest.status = "SUCCEEDED" })
|
||||
.catch((error) => {
|
||||
task.syncbackRequest.error = error
|
||||
task.syncbackRequest.status = "FAILED"
|
||||
}).finally(() => task.syncbackRequest.save())
|
||||
syncbackRequest.error = error
|
||||
syncbackRequest.status = "FAILED"
|
||||
}).finally(() => syncbackRequest.save())
|
||||
}
|
||||
|
||||
syncAllCategories() {
|
||||
|
|
|
@ -4,6 +4,10 @@ class MoveToFolderIMAP {
|
|||
this._syncbackRequest = syncbackRequest;
|
||||
}
|
||||
|
||||
syncbackRequestObject() {
|
||||
return this._syncbackRequest;
|
||||
}
|
||||
|
||||
description() {
|
||||
return `MoveToFolder`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue