Fix title reset in polls

pull/1/head
yflory 4 years ago
parent 6f1caf3540
commit 676178c0bb

@ -1166,6 +1166,7 @@ define([
var $drawer = APP.toolbar.$drawer; var $drawer = APP.toolbar.$drawer;
metadataMgr.onChange(function () { metadataMgr.onChange(function () {
if (!APP.proxy) { return; }
var md = copyObject(metadataMgr.getMetadata()); var md = copyObject(metadataMgr.getMetadata());
APP.proxy.metadata = md; APP.proxy.metadata = md;
}); });
@ -1365,6 +1366,8 @@ define([
$('#cp-app-poll-comments-add-title').remove(); $('#cp-app-poll-comments-add-title').remove();
} }
common.getPadAttribute('userid', function (e, userid) {
if (e) { console.error(e); }
var rt = APP.rt = Listmap.create(listmapConfig); var rt = APP.rt = Listmap.create(listmapConfig);
APP.proxy = rt.proxy; APP.proxy = rt.proxy;
@ -1373,16 +1376,14 @@ define([
.on('ready', function (info) { .on('ready', function (info) {
if (!firstConnection) { return; } // TODO fix this issue in listmap if (!firstConnection) { return; } // TODO fix this issue in listmap
firstConnection = false; firstConnection = false;
common.getPadAttribute('userid', function (e, userid) {
if (e) { console.error(e); }
APP.userid = userid; APP.userid = userid;
onReady(info, userid); onReady(info, userid);
});
}) })
.on('disconnect', onDisconnect) .on('disconnect', onDisconnect)
.on('reconnect', onReconnect) .on('reconnect', onReconnect)
.on('error', onError); .on('error', onError);
}); });
});
}; };
main(); main();
}); });

Loading…
Cancel
Save