Rename window.events to Whisper events

// FREEBIE
This commit is contained in:
lilia 2017-04-11 17:50:13 -07:00
parent fcff07df98
commit 3f05c8ff87

View file

@ -43,7 +43,7 @@
return -1; return -1;
} }
}; };
window.events = _.clone(Backbone.Events); Whisper.events = _.clone(Backbone.Events);
var accountManager; var accountManager;
window.getAccountManager = function() { window.getAccountManager = function() {
if (!accountManager) { if (!accountManager) {
@ -58,7 +58,7 @@
} }
Whisper.Registration.markDone(); Whisper.Registration.markDone();
console.log("dispatching registration event"); console.log("dispatching registration event");
events.trigger('registration_done'); Whisper.events.trigger('registration_done');
}); });
} }
return accountManager; return accountManager;
@ -76,7 +76,7 @@
} }
console.log("listening for registration events"); console.log("listening for registration events");
events.on('registration_done', function() { Whisper.events.on('registration_done', function() {
console.log("handling registration event"); console.log("handling registration event");
extension.keepAwake(); extension.keepAwake();
init(true); init(true);
@ -86,9 +86,9 @@
openInbox(); openInbox();
} }
Whisper.WallClockListener.init(events); Whisper.WallClockListener.init(Whisper.events);
Whisper.RotateSignedPreKeyListener.init(events); Whisper.RotateSignedPreKeyListener.init(Whisper.events);
Whisper.ExpiringMessagesListener.init(events); Whisper.ExpiringMessagesListener.init(Whisper.events);
}); });
window.getSyncRequest = function() { window.getSyncRequest = function() {