Stop ask to re-link forever
Clear the registration flag when we detect that our credentials have been invalidated, but retain the knowledge that we've been registered before, so as to preserve post-first-install behaviors like skipping the introductory install screens, and accessing the main ui. Fix #541 // FREEBIE
This commit is contained in:
parent
04a5aa71b6
commit
5223e6ed30
3 changed files with 12 additions and 4 deletions
|
@ -40,9 +40,10 @@
|
|||
extension.onLaunched(function() {
|
||||
console.log('extension launched');
|
||||
storage.onready(function() {
|
||||
if (textsecure.registration.isDone()) {
|
||||
if (textsecure.registration.everDone()) {
|
||||
openInbox();
|
||||
} else {
|
||||
}
|
||||
if (!textsecure.registration.isDone()) {
|
||||
extension.install();
|
||||
}
|
||||
});
|
||||
|
@ -180,6 +181,7 @@
|
|||
console.log(e.stack);
|
||||
|
||||
if (e.name === 'HTTPError' && (e.code == 401 || e.code == 403)) {
|
||||
textsecure.registration.remove();
|
||||
extension.install();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue