rwaldron/gaia — pull request #2 by Protonk (2013-12-03 18:10:58+00:00)
Title:  Bug 936648 - [Messages][Drafts] Draft display and interaction within a thread

* `drafts.js`:
* Modify deletion method somewhat to handle [this use case](https://github.com/rwaldron/gaia/blob/262247aea943dd98c60593b3eb5234c0aefa728b/apps/sms/js/thread_list_ui.js#L283-L285).
* Remove thread from index if it is empty
* calls `Drafts.store()` on delete (as well as on add, which is already in the feature branch)
* Update `isDistinct`
* `utils.js`:
* Update `probablyMatches` to allow for arrays or strings of numbers. I've updated the calls to `probablyMatches` which were added in the feature branch but haven't looked elsewhere
* `compose.js`:
* add `fromDraft` which checks for drafts in a given thread (or conversation) and preloads the draft into the new message composer as needed
* `thread_ui.js`
* Update the calls to delete or save a draft based on interaction. Still WIP