chat: Rename `hide` method to `reduce`

It doesn't hide: If sticky, it unsticks. Otherwise, it minimizes.
rhansen-chat
Richard Hansen 2021-12-06 17:11:28 -05:00
parent f7d7d89874
commit b830ed9744
2 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@ exports.chat = (() => {
.toggleClass('chatAndUsers popup-show stickyUsers', userAndChat);
$('#chatbox').toggleClass('chatAndUsersChat', userAndChat);
},
hide() {
reduce() {
// decide on hide logic based on chat window being maximized or not
if ($('#options-stickychat').prop('checked')) {
this.stickToScreen();
@ -221,7 +221,7 @@ exports.chat = (() => {
$('#options-stickychat').on('click', () => this.stickToScreen());
$('#options-chatandusers').on('click', () => this.chatAndUsers());
$('#chaticon').on('click', () => { this.show(); return false; });
$('#titlecross').on('click', () => { this.hide(); return false; });
$('#titlecross').on('click', () => { this.reduce(); return false; });
$('#titlesticky').on('click', () => { this.stickToScreen(true); return false; });
$('#chatinput').on('keydown', (evt) => {
// If the event is Alt C or Escape & we're already in the chat menu

View File

@ -76,7 +76,7 @@ const getParameters = [
callback: (val) => {
if (val === 'false') {
settings.hideChat = true;
chat.hide();
chat.reduce();
$('#chaticon').hide();
}
},
@ -480,7 +480,7 @@ const pad = {
}
if (window.clientVars.readonly) {
chat.hide();
chat.reduce();
$('#myusernameedit').attr('disabled', true);
$('#chatinput').attr('disabled', true);
$('#chaticon').hide();