mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 02:03:07 +08:00
fix(send): Don't queue an upload task if there are no files
This commit is contained in:
parent
59080a6654
commit
ab587d48ff
1 changed files with 4 additions and 2 deletions
|
@ -314,7 +314,8 @@ class DraftStore
|
|||
_onEnsureDraftSynced: (draftClientId) =>
|
||||
@sessionForClientId(draftClientId).then (session) =>
|
||||
@_prepareForSyncback(session).then =>
|
||||
Actions.queueTask(new SyncbackDraftFilesTask(draftClientId))
|
||||
if session.draft().files.length or session.draft().uploads.length
|
||||
Actions.queueTask(new SyncbackDraftFilesTask(draftClientId))
|
||||
Actions.queueTask(new SyncbackDraftTask(draftClientId))
|
||||
|
||||
_onSendDraft: (draftClientId) =>
|
||||
|
@ -324,7 +325,8 @@ class DraftStore
|
|||
@_prepareForSyncback(session).then =>
|
||||
if NylasEnv.config.get("core.sending.sounds")
|
||||
SoundRegistry.playSound('hit-send')
|
||||
Actions.queueTask(new SyncbackDraftFilesTask(draftClientId))
|
||||
if session.draft().files.length or session.draft().uploads.length
|
||||
Actions.queueTask(new SyncbackDraftFilesTask(draftClientId))
|
||||
Actions.queueTask(new SendDraftTask(draftClientId))
|
||||
@_doneWithSession(session)
|
||||
|
||||
|
|
Loading…
Reference in a new issue