💌 A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
Find a file
Ben Gotow e094261470 fix(drafts): If a draft disappears during editing, re-save instead of blowing up (Sentry 2844, more.)
Summary:
Previously, if a draft was deleted while a DraftChangeSet had uncommitted changes, it would blow up trying to find the draft.

This is bad, and can happen in normal scenarios. There are several changes in this diff:

- The DraftChangeSet no longer retrieves the draft from the database before saving changes. Instead, the save logic is in the DraftStoreProxy which already has a version of the draft kept fresh by a subscription to the DraftStore.

- The SyncbackDraftTask already had logic for POSTing when a PUT to a draft returns a 404, so no new logic was necessary there. THe new "commit" logic causes us to put back the draft that was lost, and then when we save it we detatch it from it's serverId and re-save.

In manual testing, this transparently handles the case where you delete a draft from Gmail while editing it.

Test Plan: I've added 22 tests for the DraftChangeSet and DraftStoreProxy

Reviewers: dillon, evan

Reviewed By: dillon, evan

Differential Revision: https://phab.nylas.com/D2012
2015-09-14 11:30:16 -07:00
apm feat(logging): Developer bar, verbose logging to logstash, Electron 0.26.0 2015-05-19 17:02:46 -07:00
arclib fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
build refactor(db): change ID system to have clientIDs and serverIDs 2015-08-28 11:24:29 -07:00
docs-templates Move guides from Edgehill repo to Redwood and only generate docs from classes 2015-06-02 16:24:56 -07:00
dot-nylas refactor(packages): Remove Edgeforce 2015-08-28 15:16:32 -04:00
examples/N1-Github refactor(package): remove old, unused, or private package. Adds examples 2015-09-10 12:57:40 -04:00
exports feat(categories): enable creating new labels and folders. addresses T3351. 2015-09-10 10:34:09 -07:00
internal_packages feat(account-sidebar): mail activity box now transitions in and out. fixes T3519. 2015-09-14 11:04:24 -07:00
keymaps tweak(menus): Move Reload, Show Activity Window to Developer menu 2015-09-09 14:05:03 -07:00
menus tweak(win32): Hide the app menu on Windows, show in a right-side button instead 2015-09-11 14:49:26 -07:00
script fix(build-flow): New integration test at the end of mac builds 2015-08-18 18:04:47 -07:00
spec tweak(jasmine): Double timeout in spec runner, see if it makes a difference 2015-09-11 16:16:21 -07:00
spec-nylas fix(drafts): If a draft disappears during editing, re-save instead of blowing up (Sentry 2844, more.) 2015-09-14 11:30:16 -07:00
src fix(drafts): If a draft disappears during editing, re-save instead of blowing up (Sentry 2844, more.) 2015-09-14 11:30:16 -07:00
static tweak(win32): Hide the app menu on Windows, show in a right-side button instead 2015-09-11 14:49:26 -07:00
vendor fix(sqlite): Connect to sqlite directly rather than sending queries over IPC (twice...) 2015-07-30 18:09:20 -07:00
.arcconfig Separate notifications if less than five 2015-07-15 13:18:10 -07:00
.arclint Separate notifications if less than five 2015-07-15 13:18:10 -07:00
.gitattributes fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.gitignore feat(preferences): WIP Preferences panel 2015-08-14 15:40:11 -07:00
.gitmodules fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.node-version fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
atom.sh refactor(code): replace all instances of atom-shell and AtomShell and atomShell 2015-05-20 10:20:10 -07:00
coffeelint.json feat(docs): New docs tasks and React 0.13.2 2015-04-24 11:33:10 -07:00
LICENSE.md refactor(cruft): remove old Atom docs and other cruft 2015-07-24 14:27:21 -07:00
package.json bump(version): 0.3.6 2015-09-10 19:01:15 -07:00
README.md fix(readme): Rip out Atom readme, replace with our own minimal one 2015-04-30 16:24:09 -07:00

Nylas Mail is a hackable platform for your personal data, built on Electron and the Nylas Platform APIs.

Building Nylas Mail

Extending Nylas Mail

It's easy to extend Nylas Mail using your favorite web technologies. Check out the Nylas Package API to get started, and the API reference for information about specific classes.