From 248b87a1e1a7b084ad48ae0f5c314efa07a392ef Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 18 Sep 2018 16:36:29 +0200 Subject: [PATCH] Enable chat in the poll app --- www/poll/inner.js | 6 ++++++ www/poll/main.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/www/poll/inner.js b/www/poll/inner.js index 08793c63c..7732b4be3 100644 --- a/www/poll/inner.js +++ b/www/poll/inner.js @@ -1092,6 +1092,11 @@ define([ Test(passIfOk); } + // No need for onLocal in openPadChat because in poll, we listen for metadata changes + // and save them everytime. + // See `metadataMgr.onChange(function () {` + common.openPadChat(function () {}); + UI.removeLoadingScreen(); var privateDat = metadataMgr.getPrivateData(); var skipTemp = Util.find(privateDat, @@ -1160,6 +1165,7 @@ define([ var configTb = { displayed: [ + 'chat', 'userlist', 'title', 'useradmin', diff --git a/www/poll/main.js b/www/poll/main.js index 85bbb6f62..2f62d3323 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -37,7 +37,8 @@ define([ window.addEventListener('message', onMsg); }).nThen(function (/*waitFor*/) { SFCommonO.start({ - useCreationScreen: true + useCreationScreen: true, + messaging: true }); }); });