From 1f0a93bf70778acfcd7c0972ce8006e325bc6450 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 14 Sep 2016 18:36:05 -0700 Subject: [PATCH] Ensure new installs default to non-blocking // FREEBIE --- js/background.js | 3 +++ js/chromium.js | 18 ------------------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/js/background.js b/js/background.js index 693943bcd..24b4c1d58 100644 --- a/js/background.js +++ b/js/background.js @@ -51,6 +51,9 @@ SERVER_URL, SERVER_PORTS, USERNAME, PASSWORD ); accountManager.addEventListener('registration', function() { + if (!Whisper.Registration.everDone()) { + storage.put('safety-numbers-approval', false); + } Whisper.Registration.markDone(); extension.trigger('registration_done'); }); diff --git a/js/chromium.js b/js/chromium.js index 0ed50dc52..5d3e5ee27 100644 --- a/js/chromium.js +++ b/js/chromium.js @@ -180,24 +180,6 @@ return 'en'; }; - window.textsecure = window.textsecure || {}; - window.textsecure.registration = { - done: function () { - storage.put("chromiumRegistrationDoneEver", ""); - storage.put("chromiumRegistrationDone", ""); - extension.trigger('registration_done'); - }, - isDone: function () { - return storage.get("chromiumRegistrationDone") === ""; - }, - everDone: function() { - return storage.get("chromiumRegistrationDoneEver") === "" || storage.get("chromiumRegistrationDone") === ""; - }, - remove: function() { - storage.remove("chromiumRegistrationDone"); - }, - }; - extension.install = function(mode) { var id = 'installer'; var url = 'options.html';