Always listen for (re-)registration events

If we clear local storage and re-register in a foreground page, the
background page needs to re-init its websocket with the new account
credentials.
This commit is contained in:
lilia 2014-12-29 16:19:30 +01:00
parent 9a30a1e175
commit 4e6faf4e27
1 changed files with 1 additions and 2 deletions

View File

@ -26,9 +26,8 @@
if (textsecure.registration.isDone()) {
init();
} else {
extension.on('registration_done', init);
}
extension.on('registration_done', init);
function init() {
if (!textsecure.registration.isDone()) { return; }