Ensure new installs default to non-blocking
// FREEBIE
This commit is contained in:
parent
1fe90ecdcb
commit
1f0a93bf70
2 changed files with 3 additions and 18 deletions
|
@ -51,6 +51,9 @@
|
||||||
SERVER_URL, SERVER_PORTS, USERNAME, PASSWORD
|
SERVER_URL, SERVER_PORTS, USERNAME, PASSWORD
|
||||||
);
|
);
|
||||||
accountManager.addEventListener('registration', function() {
|
accountManager.addEventListener('registration', function() {
|
||||||
|
if (!Whisper.Registration.everDone()) {
|
||||||
|
storage.put('safety-numbers-approval', false);
|
||||||
|
}
|
||||||
Whisper.Registration.markDone();
|
Whisper.Registration.markDone();
|
||||||
extension.trigger('registration_done');
|
extension.trigger('registration_done');
|
||||||
});
|
});
|
||||||
|
|
|
@ -180,24 +180,6 @@
|
||||||
return 'en';
|
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) {
|
extension.install = function(mode) {
|
||||||
var id = 'installer';
|
var id = 'installer';
|
||||||
var url = 'options.html';
|
var url = 'options.html';
|
||||||
|
|
Loading…
Reference in a new issue