From b56a782f01c3eaddf9337cbf20004e4ece7dd805 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 19 Jul 2017 14:38:46 +0200 Subject: [PATCH] Store the userlist state when it is closed using the icon --- www/common/toolbar2.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/common/toolbar2.js b/www/common/toolbar2.js index 1347518df..050601e2f 100644 --- a/www/common/toolbar2.js +++ b/www/common/toolbar2.js @@ -348,7 +348,10 @@ define([ var h = $ck.is(':visible') ? -$ck.height() : 0; $content.css('margin-top', h+'px'); }); - $closeIcon.click(hide); + $closeIcon.click(function () { + Cryptpad.setAttribute('userlist-drawer', false); + hide(); + }); $button.click(function () { var visible = $content.is(':visible'); if (visible) { hide(); } @@ -358,7 +361,6 @@ define([ Cryptpad.feedback(visible?'USERLIST_SHOW': 'USERLIST_HIDE'); }); - Cryptpad.getAttribute('userlist-drawer', function (err, val) { if (val === false || mobile) { return void hide(); } show();