diff --git a/internal_packages/composer/lib/main.cjsx b/internal_packages/composer/lib/main.cjsx index 93708af10..45467b0f5 100644 --- a/internal_packages/composer/lib/main.cjsx +++ b/internal_packages/composer/lib/main.cjsx @@ -20,8 +20,9 @@ class ComposerWithWindowProps extends React.Component componentDidMount: -> @unlisten = atom.onWindowPropsReceived (windowProps) => {errorMessage} = windowProps - @_showInitialErrorDialog(errorMessage) if errorMessage @setState(windowProps) + if errorMessage + @_showInitialErrorDialog(errorMessage) componentWillUnmount: -> @unlisten() diff --git a/src/flux/nylas-api.coffee b/src/flux/nylas-api.coffee index 651735564..964296710 100644 --- a/src/flux/nylas-api.coffee +++ b/src/flux/nylas-api.coffee @@ -10,7 +10,7 @@ async = require 'async' # A 0 code is when an error returns without a status code. These are # things like "ESOCKETTIMEDOUT" TimeoutErrorCode = 0 -PermanentErrorCodes = [400, 404, 500, TimeoutErrorCode] +PermanentErrorCodes = [400, 404, 500] CancelledErrorCode = -123 SampleTemporaryErrorCode = 504 diff --git a/src/flux/tasks/change-starred-task.coffee b/src/flux/tasks/change-starred-task.coffee index ec42a7242..ac595dda6 100644 --- a/src/flux/tasks/change-starred-task.coffee +++ b/src/flux/tasks/change-starred-task.coffee @@ -10,6 +10,12 @@ class ChangeStarredTask extends ChangeMailTask constructor: ({@starred}={}) -> super + label: -> + if @starred + "Starring…" + else + "Unstarring…" + description: -> count = @threads.length type = 'thread' diff --git a/src/flux/tasks/send-draft.coffee b/src/flux/tasks/send-draft.coffee index c8740704e..a86e2180e 100644 --- a/src/flux/tasks/send-draft.coffee +++ b/src/flux/tasks/send-draft.coffee @@ -89,7 +89,8 @@ class SendDraftTask extends Task body.thread_id = null body.reply_to_message_id = null return @_send(body) - else if err.statusCode in NylasAPI.PermanentErrorCodes + else if (err.statusCode in NylasAPI.PermanentErrorCodes or + err.statusCode is NylasAPI.TimeoutErrorCode) @_permanentError() else return Promise.resolve(Task.Status.Retry)