Don't redirect until realtime is synced when logging in

This commit is contained in:
yflory
2017-03-08 16:15:31 +01:00
parent 0c1efd361b
commit a8d200ef2e
3 changed files with 19 additions and 14 deletions

View File

@@ -132,8 +132,10 @@ define([
if (result.proxy && !result.proxy.login_name) {
result.proxy.login_name = result.userName;
}
Cryptpad.login(result.userHash, result.userName, function () {
document.location.href = '/drive/';
Cryptpad.whenRealtimeSyncs(result.realtime, function () {
Cryptpad.login(result.userHash, result.userName, function () {
document.location.href = '/drive/';
});
});
return;
}