Abstract nativeclient callback logic
The nativeclient.js module overrides window.textsecure.registerOnLoadFunction with its own version. Otherwise helpers will define a trivial placeholder for same. The flag textsecure.NATIVE_CLIENT can be set anywhere ahead of nativeclient.js, but is only acted on in nativeclient.js, and crypto.js.
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
;(function() {
|
||||
'use strict';
|
||||
window.textsecure = window.textsecure || {};
|
||||
window.textsecure.NATIVE_CLIENT = window.textsecure.NATIVE_CLIENT || true;
|
||||
|
||||
if (!textsecure.NATIVE_CLIENT) {
|
||||
window.textsecure.registerOnLoadFunction = window.textsecure.nativeclient.registerOnLoadFunction;
|
||||
}
|
||||
|
||||
var naclMessageNextId = 0;
|
||||
var naclMessageIdCallbackMap = {};
|
||||
|
Reference in New Issue
Block a user