Files
Odoo-Modules/Work in Progress/fusion_backend_theme/static/src/chatter/chatter.js
gsinghpal fc3c966484 changes
2026-03-13 12:38:28 -04:00

25 lines
848 B
JavaScript

import { patch } from "@web/core/utils/patch";
import { browser } from "@web/core/browser/browser";
import { Chatter } from "@mail/chatter/web_portal/chatter";
patch(Chatter.prototype, {
setup() {
super.setup();
const showNotificationMessages = browser.localStorage.getItem(
'fusion_backend_theme.notifications'
);
this.state.showNotificationMessages = (
showNotificationMessages != null ?
JSON.parse(showNotificationMessages) : true
);
},
onClickNotificationsToggle() {
const showNotificationMessages = !this.state.showNotificationMessages;
browser.localStorage.setItem(
'fusion_backend_theme.notifications', showNotificationMessages
);
this.state.showNotificationMessages = showNotificationMessages;
},
});