mozilla-b2g/gaia — pull request #9518 by jrburke (2013-05-02 20:21:05+00:00)
Title: Bug 868141: email: only insert new account card once

The injectStartCard function tried to inject the New Account card as soon as possible, however the final state of the account is also checked in acctSlice.oncomplete, which is fired using the cached backend data. That oncomplete handler was called before the dynamic load of setup-cards.js completed. Since the New Account card had not been inserted yet, it triggered another call to pushCard was done.

This change now only does the New Account card work in the oncomplete callback.