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
|
@ -39714,6 +39714,7 @@ function generateKeys(count, progressCallback) {
|
|||
eventTarget.dispatchEvent(ev);
|
||||
contactDetails = contactBuffer.next();
|
||||
}
|
||||
eventTarget.dispatchEvent(new Event('textsecure:contactsync'));
|
||||
});
|
||||
},
|
||||
handleGroups: function(groups) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -188,6 +188,7 @@
|
|||
eventTarget.dispatchEvent(ev);
|
||||
contactDetails = contactBuffer.next();
|
||||
}
|
||||
eventTarget.dispatchEvent(new Event('textsecure:contactsync'));
|
||||
});
|
||||
},
|
||||
handleGroups: function(groups) {
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
</div>
|
||||
<div class='progress-dialog'>
|
||||
<div class='status'></div>
|
||||
<div class='bar-container'><div class='bar'></div></div>
|
||||
<div class='bar-container'><div class='bar progress-bar'></div></div>
|
||||
</div>
|
||||
<div class='error-dialog clearfix'>
|
||||
<div class='panel'>Sorry, you have too many devices registered already. Try removing some.</div>
|
||||
|
|
Loading…
Reference in a new issue