mozilla/browserid — pull request #1152 by fawek (2012-02-19 00:39:51+00:00)
Title: Sync the e-mail list before attempting to remove an e-mail

Fixes #1123.

This is probably a suboptimal fix. Ideally, there would be an API call that removes an e-mail and cancels the account (or just make it the default behavior) iff there are no other addresses but it would be hard to combine this with the UI confirmation step. Instead of a confirmation dialog, there could be a small footnote in the Account manager that removing the last e-mail is synonymous with deleting the account. In that case, you could just do the "remove the e-mail and the account" atomically on the server without having to check again with the user.