Collect references to Whisper.events

Fixup

// FREEBIE
This commit is contained in:
lilia 2017-04-24 17:59:11 -07:00 committed by Scott Nonnenberg
parent f7c7e2251d
commit a2e0fa59c1
No known key found for this signature in database
GPG key ID: A4931C09644C654B
4 changed files with 23 additions and 13 deletions

View file

@ -65,7 +65,7 @@
init(true);
});
var appView = window.owsDesktopApp.appView = new Whisper.AppView({el: $('body'), events: Whisper.events});
var appView = window.owsDesktopApp.appView = new Whisper.AppView({el: $('body')});
Whisper.WallClockListener.init(Whisper.events);
Whisper.RotateSignedPreKeyListener.init(Whisper.events);
@ -87,6 +87,14 @@
appView.inboxView.networkStatusView.setSocketReconnectInterval(60000);
});
[
'openInbox',
'openInstaller',
'openConversation',
'openStandalone'
].forEach(function(eventName) {
appView.listenTo(Whisper.events, eventName, appView[eventName]);
});
});
window.getSyncRequest = function() {