mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Drop chrome.runtime.onMessage events
We can use Backbone.Events instead. // FREEBIE
This commit is contained in:
+4
-2
@@ -44,6 +44,7 @@
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
window.events = _.clone(Backbone.Events);
|
||||
var accountManager;
|
||||
window.getAccountManager = function() {
|
||||
if (!accountManager) {
|
||||
@@ -58,12 +59,13 @@
|
||||
}
|
||||
Whisper.Registration.markDone();
|
||||
console.log("dispatching registration event");
|
||||
extension.trigger('registration_done');
|
||||
events.trigger('registration_done');
|
||||
});
|
||||
}
|
||||
return accountManager;
|
||||
};
|
||||
|
||||
|
||||
storage.fetch();
|
||||
storage.onready(function() {
|
||||
window.dispatchEvent(new Event('storage_ready'));
|
||||
@@ -75,7 +77,7 @@
|
||||
}
|
||||
|
||||
console.log("listening for registration events");
|
||||
extension.on('registration_done', function() {
|
||||
events.on('registration_done', function() {
|
||||
console.log("handling registration event");
|
||||
extension.keepAwake();
|
||||
init(true);
|
||||
|
||||
Reference in New Issue
Block a user