Merge branch 'register' into staging

This commit is contained in:
ansuz 2021-03-03 15:34:37 +05:30
commit 6f97827808
2 changed files with 6 additions and 2 deletions

View file

@ -2271,6 +2271,7 @@ define([
var channelIsReady = waitFor();
updateLocalVersion();
var msgEv = Util.mkEvent();
var postMsg, worker;
@ -2504,7 +2505,6 @@ define([
AppConfig.afterLogin(common, waitFor());
}
}).nThen(function () {
updateLocalVersion();
f(void 0, env);
if (typeof(window.onhashchange) === 'function') { window.onhashchange(); }
});

View file

@ -2687,7 +2687,8 @@ define([
// every user object should have a persistent, random number
if (typeof(proxy.loginToken) !== 'number') {
proxy[Constants.tokenKey] = Math.floor(Math.random()*Number.MAX_SAFE_INTEGER);
proxy[Constants.tokenKey] = store.data.localToken ||
Math.floor(Math.random()*Number.MAX_SAFE_INTEGER);
}
returned[Constants.tokenKey] = proxy[Constants.tokenKey];
@ -2847,12 +2848,15 @@ define([
if (store.ready) { return; } // the store is already ready, it is a reconnection
store.driveMetadata = info.metadata;
if (!rt.proxy.drive || typeof(rt.proxy.drive) !== 'object') { rt.proxy.drive = {}; }
/*
// XXX deprecating localStorage migration
var drive = rt.proxy.drive;
// Creating a new anon drive: import anon pads from localStorage
if ((!drive[Constants.oldStorageKey] || !Array.isArray(drive[Constants.oldStorageKey]))
&& !drive['filesData']) {
drive[Constants.oldStorageKey] = [];
}
*/
// Drive already exist: return the existing drive, don't load data from legacy store
if (store.manager) {
// If a cache is loading, make sure it is complete before calling onReady