feat: Adds the ability to disable the "new message notification" popup (#9594)

This commit is contained in:
Sivin Varghese
2024-06-11 08:14:58 +05:30
committed by GitHub
parent 20b2dc8c6f
commit 9689bbf0dd
6 changed files with 22 additions and 2 deletions

View File

@@ -71,6 +71,7 @@ export default {
messageCount: 'conversation/getMessageCount',
unreadMessageCount: 'conversation/getUnreadMessageCount',
isWidgetStyleFlat: 'appConfig/isWidgetStyleFlat',
showUnreadMessagesDialog: 'appConfig/getShowUnreadMessagesDialog',
}),
isIFrame() {
return IFrameHelper.isIFrame();
@@ -209,8 +210,13 @@ export default {
},
setUnreadView() {
const { unreadMessageCount } = this;
if (this.isIFrame && unreadMessageCount > 0 && !this.isWidgetOpen) {
if (!this.showUnreadMessagesDialog) {
this.handleUnreadNotificationDot();
} else if (
this.isIFrame &&
unreadMessageCount > 0 &&
!this.isWidgetOpen
) {
this.replaceRoute('unread-messages').then(() => {
this.setIframeHeight(true);
IFrameHelper.sendMessage({ event: 'setUnreadMode' });