Fix handlers registered again on reconnect in drive and poll

pull/1/head
yflory 7 years ago
parent 204f3e1441
commit 2dd3c42fd5

@ -3005,7 +3005,10 @@ define([
APP.$displayName.text(name);
});
};
var firstConnection = true;
var onReady = function () {
if (!firstConnection) { return; } // TODO fix this issue in listmap
firstConnection = false;
$('body').css('display', '');
APP.files = proxy;
if (!proxy.drive || typeof(proxy.drive) !== 'object') { proxy.drive = {}; }

@ -1164,8 +1164,11 @@ define([
var rt = APP.rt = Listmap.create(listmapConfig);
APP.proxy = rt.proxy;
var firstConnection = true;
rt.proxy.on('create', onCreate)
.on('ready', function (info) {
if (!firstConnection) { return; } // TODO fix this issue in listmap
firstConnection = false;
common.getPadAttribute('userid', function (e, userid) {
if (e) { console.error(e); }
APP.userid = userid;

Loading…
Cancel
Save