mozilla-b2g/gaia — pull request #15738 by evhan55 (2014-01-27 19:20:48+00:00)
Title: Bug 959696 - [Messages][Drafts][Refactoring] Move draft saving on visibility change to ThreadUI, and only store drafts if new one is saved

- `message_manager.js`
- remove the visibility change draft-saving behavior
- `thread_ui.js`
- add a visibility change handler
- add draft-saving behavior to visibility change handler
- Tests
- `message_manager_test.js`
- remove visibility change tests
- `thread_ui_test.js`
- add visibility change tests to check that draft saves properly on app hiding
- manual tests
- start a new draft => hide app => show app => alter draft => click back => check that it asks to 'replace' draft and not 'save' a new draft