diff --git a/conversejs/custom/plugins/notes/components/muc-note-app-view.js b/conversejs/custom/plugins/notes/components/muc-note-app-view.js index 92ac6295..4747fab0 100644 --- a/conversejs/custom/plugins/notes/components/muc-note-app-view.js +++ b/conversejs/custom/plugins/notes/components/muc-note-app-view.js @@ -10,8 +10,8 @@ import { tplMUCNoteApp } from '../templates/muc-note-app.js' * Custom Element to display the Notes Application. */ export default class MUCNoteApp extends MUCApp { - enableSettingName = 'livechat_note_app_restore' - sessionStorangeShowKey = 'livechat-converse-note-app-show' + restoreSettingName = 'livechat_note_app_restore' + sessionStorageRestoreKey = 'livechat-converse-note-app-show' render () { return tplMUCNoteApp(this, this.model) diff --git a/conversejs/custom/plugins/tasks/components/muc-task-app-view.js b/conversejs/custom/plugins/tasks/components/muc-task-app-view.js index c7ad938a..d1b8378e 100644 --- a/conversejs/custom/plugins/tasks/components/muc-task-app-view.js +++ b/conversejs/custom/plugins/tasks/components/muc-task-app-view.js @@ -10,8 +10,8 @@ import { tplMUCTaskApp } from '../templates/muc-task-app.js' * Custom Element to display the Task Application. */ export default class MUCTaskApp extends MUCApp { - enableSettingName = 'livechat_task_app_restore' - sessionStorangeShowKey = 'livechat-converse-task-app-show' + restoreSettingName = 'livechat_task_app_restore' + sessionStorageRestoreKey = 'livechat-converse-task-app-show' render () { return tplMUCTaskApp(this, this.model) diff --git a/conversejs/custom/shared/components/muc-app/index.js b/conversejs/custom/shared/components/muc-app/index.js index a532391a..6c794868 100644 --- a/conversejs/custom/shared/components/muc-app/index.js +++ b/conversejs/custom/shared/components/muc-app/index.js @@ -11,8 +11,8 @@ import './styles/muc-app.scss' * This is an abstract class, should not be called directly. */ export class MUCApp extends CustomElement { - enableSettingName = undefined // must be overloaded - sessionStorangeShowKey = undefined // must be overloaded + restoreSettingName = undefined // must be overloaded + sessionStorageRestoreKey = undefined // must be overloaded static get properties () { return { @@ -23,10 +23,10 @@ export class MUCApp extends CustomElement { async initialize () { this.classList.add('livechat-converse-muc-app') - this.show = this.enableSettingName && - api.settings.get(this.enableSettingName) && - this.sessionStorangeShowKey && - (window.sessionStorage?.getItem?.(this.sessionStorangeShowKey) === '1') + this.show = this.restoreSettingName && + api.settings.get(this.restoreSettingName) && + this.sessionStorageRestoreKey && + (window.sessionStorage?.getItem?.(this.sessionStorageRestoreKey) === '1') // we listen for livechatSizeChanged event, // and close all apps except the first if small or medium width. @@ -63,8 +63,8 @@ export class MUCApp extends CustomElement { toggleApp () { this.show = !this.show - if (this.sessionStorangeShowKey) { - window.sessionStorage?.setItem?.(this.sessionStorangeShowKey, this.show ? '1' : '') + if (this.sessionStorageRestoreKey) { + window.sessionStorage?.setItem?.(this.sessionStorageRestoreKey, this.show ? '1' : '') } if (