Fix handlers registered again on reconnect in drive and poll
This commit is contained in:
@@ -3005,7 +3005,10 @@ define([
|
|||||||
APP.$displayName.text(name);
|
APP.$displayName.text(name);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var firstConnection = true;
|
||||||
var onReady = function () {
|
var onReady = function () {
|
||||||
|
if (!firstConnection) { return; } // TODO fix this issue in listmap
|
||||||
|
firstConnection = false;
|
||||||
$('body').css('display', '');
|
$('body').css('display', '');
|
||||||
APP.files = proxy;
|
APP.files = proxy;
|
||||||
if (!proxy.drive || typeof(proxy.drive) !== 'object') { proxy.drive = {}; }
|
if (!proxy.drive || typeof(proxy.drive) !== 'object') { proxy.drive = {}; }
|
||||||
|
|||||||
@@ -1164,8 +1164,11 @@ define([
|
|||||||
var rt = APP.rt = Listmap.create(listmapConfig);
|
var rt = APP.rt = Listmap.create(listmapConfig);
|
||||||
APP.proxy = rt.proxy;
|
APP.proxy = rt.proxy;
|
||||||
|
|
||||||
|
var firstConnection = true;
|
||||||
rt.proxy.on('create', onCreate)
|
rt.proxy.on('create', onCreate)
|
||||||
.on('ready', function (info) {
|
.on('ready', function (info) {
|
||||||
|
if (!firstConnection) { return; } // TODO fix this issue in listmap
|
||||||
|
firstConnection = false;
|
||||||
common.getPadAttribute('userid', function (e, userid) {
|
common.getPadAttribute('userid', function (e, userid) {
|
||||||
if (e) { console.error(e); }
|
if (e) { console.error(e); }
|
||||||
APP.userid = userid;
|
APP.userid = userid;
|
||||||
|
|||||||
Reference in New Issue
Block a user