Check for registration when launched
This commit is contained in:
parent
f6a326577d
commit
16e9f03d8f
2 changed files with 8 additions and 6 deletions
|
@ -20,11 +20,6 @@
|
||||||
storage.onready(function() {
|
storage.onready(function() {
|
||||||
var messageReceiver;
|
var messageReceiver;
|
||||||
|
|
||||||
if (!storage.get('first_install_ran')) {
|
|
||||||
storage.put('first_install_ran', 1);
|
|
||||||
extension.install();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (textsecure.registration.isDone()) {
|
if (textsecure.registration.isDone()) {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,14 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
extension.onLaunched(openInbox);
|
|
||||||
|
extension.onLaunched(function() {
|
||||||
|
if (textsecure.registration.isDone()) {
|
||||||
|
openInbox();
|
||||||
|
} else {
|
||||||
|
extension.install();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// make sure windows are cleaned up on close
|
// make sure windows are cleaned up on close
|
||||||
extension.windows.onClosed(function (windowId) {
|
extension.windows.onClosed(function (windowId) {
|
||||||
|
|
Loading…
Reference in a new issue