Fix race condition with nthen

pull/1/head
yflory 6 years ago
parent 5477b83865
commit 62c96d562f

@ -197,7 +197,7 @@ define([
}, 500); }, 500);
progress(0, 0);*/ progress(0, 0);*/
}).nThen(function () { }).nThen(function () {
cb(); setTimeout(cb);
}); });
}; };
}); });

@ -1644,6 +1644,7 @@ define([
}); });
userObject.migrate(waitFor()); userObject.migrate(waitFor());
}).nThen(function (waitFor) { }).nThen(function (waitFor) {
loadMailbox(waitFor);
Migrate(proxy, waitFor(), function (version, progress) { Migrate(proxy, waitFor(), function (version, progress) {
postMessage(clientId, 'LOADING_DRIVE', { postMessage(clientId, 'LOADING_DRIVE', {
state: (2 + (version / 10)), state: (2 + (version / 10)),
@ -1661,7 +1662,6 @@ define([
loadMessenger(); loadMessenger();
loadCursor(); loadCursor();
loadOnlyOffice(); loadOnlyOffice();
loadMailbox(waitFor);
loadUniversal(Profile, 'profile', waitFor); loadUniversal(Profile, 'profile', waitFor);
cleanFriendRequests(); cleanFriendRequests();
}).nThen(function () { }).nThen(function () {

Loading…
Cancel
Save