mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-12 02:01:31 -04:00
chat: Move cookie pref handling to chat init in chat.js
It's unclear why this logic was previously triggered by connection state changes, but it doesn't make sense for it to be there.
This commit is contained in:
parent
a5c729af32
commit
e0f28cfe86
3 changed files with 12 additions and 21 deletions
|
@ -293,6 +293,14 @@ exports.chat = (() => {
|
|||
if (settings.hideChat) this.hide();
|
||||
if (searchParams.get('alwaysShowChat') === 'true' && !settings.hideChat) this.stickToScreen();
|
||||
if (searchParams.get('chatAndUsers') === 'true') this.chatAndUsers();
|
||||
|
||||
const chatVisCookie = !!padcookie.getPref('chatAlwaysVisible');
|
||||
if (chatVisCookie) this.stickToScreen(true);
|
||||
$('#options-stickychat').prop('checked', chatVisCookie);
|
||||
|
||||
const chatAUVisCookie = !!padcookie.getPref('chatAndUsersVisible');
|
||||
if (chatAUVisCookie) this.chatAndUsers(true);
|
||||
$('#options-chatandusers').prop('checked', chatAUVisCookie);
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue