mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-09 17:55:35 +08:00
Fix calls to new DestroyDraftTask
This commit is contained in:
parent
94ef9813b6
commit
432baa6a3a
1 changed files with 5 additions and 2 deletions
|
@ -126,7 +126,10 @@ class DraftStore extends NylasStore {
|
||||||
_.each(this._draftSessions, (session) => {
|
_.each(this._draftSessions, (session) => {
|
||||||
const draft = session.draft()
|
const draft = session.draft()
|
||||||
if (draft && draft.pristine) {
|
if (draft && draft.pristine) {
|
||||||
Actions.queueTask(new DestroyDraftTask(draft.accountId, draft.headerMessageId));
|
Actions.queueTask(new DestroyDraftTask({
|
||||||
|
accountId: draft.accountId,
|
||||||
|
headerMessageId: draft.headerMessageId,
|
||||||
|
}));
|
||||||
} else {
|
} else {
|
||||||
promises.push(session.changes.commit());
|
promises.push(session.changes.commit());
|
||||||
}
|
}
|
||||||
|
@ -353,7 +356,7 @@ class DraftStore extends NylasStore {
|
||||||
})
|
})
|
||||||
|
|
||||||
// Queue the task to destroy the draft
|
// Queue the task to destroy the draft
|
||||||
Actions.queueTask(new DestroyDraftTask(accountId, headerMessageId));
|
Actions.queueTask(new DestroyDraftTask({accountId, headerMessageId}));
|
||||||
|
|
||||||
if (NylasEnv.isComposerWindow()) {
|
if (NylasEnv.isComposerWindow()) {
|
||||||
NylasEnv.close();
|
NylasEnv.close();
|
||||||
|
|
Loading…
Reference in a new issue