mozilla-b2g/gaia — pull request #15572 by jrburke (2014-01-22 00:56:21+00:00)
Title: Bug 962149 - [E-Mail][UI] HTML cache saves/serializes edit mode state

There were two issues here:

* editMode was not considered when deciding when to cache
* even if considered, the actual cache save happens after a timeout, and the card state could have changed since deciding to cache.

So this changeset collects the visual card ui state checks, including editMode, into a function that is checked both when the caching is considered and then before it is actually done.

Tested on device, and issue is fixed, as well as caching still working in the expected case.