mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user