Guard against forks while in offline mode
parent
b1d9442008
commit
57a4d0590c
|
@ -499,7 +499,6 @@ define([
|
|||
var cb = Util.once(Util.mkAsync(_cb));
|
||||
var channel = Hash.hrefToHexChannelId(href, password);
|
||||
var error;
|
||||
var inCache = false;
|
||||
Nthen(function (waitFor) {
|
||||
Cache.getChannelCache(channel, waitFor(function(err, data) {
|
||||
if (err || !data) { return; }
|
||||
|
|
|
@ -2533,8 +2533,6 @@ define([
|
|||
var onCacheReady = function (clientId, cb) {
|
||||
var proxy = store.proxy;
|
||||
if (store.manager) { return void cb(); }
|
||||
if (!proxy.settings) { proxy.settings = NEW_USER_SETTINGS; }
|
||||
if (!proxy.friends_pending) { proxy.friends_pending = {}; }
|
||||
var unpin = function (data, cb) {
|
||||
if (!store.loggedIn) { return void cb(); }
|
||||
Store.unpinPads(null, data, cb);
|
||||
|
@ -2579,6 +2577,8 @@ define([
|
|||
|
||||
nThen(function (waitFor) {
|
||||
if (manager) { return; }
|
||||
if (!proxy.settings) { proxy.settings = NEW_USER_SETTINGS; }
|
||||
if (!proxy.friends_pending) { proxy.friends_pending = {}; }
|
||||
onCacheReady(clientId, waitFor());
|
||||
manager = store.manager;
|
||||
userObject = store.userObject;
|
||||
|
@ -2767,7 +2767,6 @@ define([
|
|||
|
||||
// Check if we can connect
|
||||
var to = setTimeout(function () {
|
||||
console.error('TO');
|
||||
store.networkTimeout = true;
|
||||
broadcast([], "LOADING_DRIVE", {
|
||||
type: "offline"
|
||||
|
|
|
@ -183,10 +183,6 @@ define([
|
|||
};
|
||||
var rt = sf.rt = Listmap.create(listmapConfig);
|
||||
rt.proxy.on('cacheready', function () {
|
||||
if (isNew && !Object.keys(rt.proxy).length) {
|
||||
// New Shared folder: no migration required
|
||||
rt.proxy.version = 2;
|
||||
}
|
||||
if (!sf.teams) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue