allow mixpanel to be already set up elsewhere

pull/512/head
Ryan Tharp 6 years ago
parent 88b44390bf
commit c921d3e3b3

@ -230,7 +230,8 @@
window.feeds = []; window.feeds = [];
window.lokiMessageAPI = new window.LokiMessageAPI(ourKey); window.lokiMessageAPI = new window.LokiMessageAPI(ourKey);
window.lokiPublicChatAPI = new window.LokiPublicChatAPI(ourKey); window.lokiPublicChatAPI = new window.LokiPublicChatAPI(ourKey);
window.mixpanel = new window.LokiMixpanelAPI(); // set up mixpanel
window.mixpanel = window.mixpanel || new window.LokiMixpanelAPI(); // incase account manager already set it up
// window.mixpanel.track("Desktop boot"); // window.mixpanel.track("Desktop boot");
window.lokiP2pAPI = new window.LokiP2pAPI(ourKey); window.lokiP2pAPI = new window.LokiP2pAPI(ourKey);
window.lokiP2pAPI.on('pingContact', pubKey => { window.lokiP2pAPI.on('pingContact', pubKey => {

@ -22,13 +22,14 @@
(function() { (function() {
window.textsecure = window.textsecure || {}; window.textsecure = window.textsecure || {};
// set up mixpanel
window.mixpanel = window.mixpanel || new window.LokiMixpanelAPI();
const ARCHIVE_AGE = 7 * 24 * 60 * 60 * 1000; const ARCHIVE_AGE = 7 * 24 * 60 * 60 * 1000;
function AccountManager(username, password) { function AccountManager(username, password) {
// this.server = window.WebAPI.connect({ username, password }); // this.server = window.WebAPI.connect({ username, password });
this.pending = Promise.resolve(); this.pending = Promise.resolve();
// set up mixpanel
window.mixpanel = new window.LokiMixpanelAPI();
} }
function getNumber(numberId) { function getNumber(numberId) {

Loading…
Cancel
Save