Wait for contact sync before opening inbox
Use a canned bootstrap progress animation in lieu of better design. Fix #271 // FREEBIE
This commit is contained in:
parent
4f1ce4c493
commit
c3d3ec125d
4 changed files with 14 additions and 3 deletions
|
@ -79,8 +79,17 @@
|
|||
|
||||
var accountManager = new bg.textsecure.AccountManager();
|
||||
accountManager.registerSecondDevice(setProvisioningUrl, confirmNumber, incrementCounter).then(function() {
|
||||
bg.openInbox();
|
||||
window.close();
|
||||
var launch = function() {
|
||||
bg.openInbox();
|
||||
bg.removeEventListener('textsecure:contactsync', launch);
|
||||
clearTimeout(timeout);
|
||||
window.close();
|
||||
};
|
||||
var timeout = setTimeout(launch, 60000);
|
||||
bg.addEventListener('textsecure:contactsync', launch);
|
||||
$('.progress-dialog .status').text('Syncing groups and contacts');
|
||||
$('.progress-dialog .bar').addClass('progress-bar-striped active');
|
||||
|
||||
}).catch(function(e) {
|
||||
if (e.name === 'HTTPError' && e.code == 411) {
|
||||
$('.progress-dialog').hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue