mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-12 02:58:20 +08:00
fix(destroy-category): Process syncback request deltas correctly
This commit is contained in:
parent
21db84f13f
commit
360493567f
1 changed files with 2 additions and 2 deletions
|
@ -68,8 +68,8 @@ export default class DestroyCategoryTask extends Task {
|
|||
.then((json) => {
|
||||
const syncbackRequestId = json.id
|
||||
const unsubscribe = Actions.didReceiveSyncbackRequestDeltas.listen(async (deltas) => {
|
||||
const failed = deltas.failed.find(d => d.objectId === syncbackRequestId)
|
||||
const succeeded = deltas.succeeded.find(d => d.objectId === syncbackRequestId)
|
||||
const failed = deltas.find(d => d.id === syncbackRequestId && d.status === 'FAILED')
|
||||
const succeeded = deltas.find(d => d.id === syncbackRequestId && d.status === 'SUCCEEDED')
|
||||
if (failed) {
|
||||
unsubscribe()
|
||||
await DatabaseStore.inTransaction((t) =>
|
||||
|
|
Loading…
Reference in a new issue