Enhancement: Show unread marker on widget bubble (#3390)
* add unread marker * add removeClass in IFramehelper * Update app/javascript/sdk/sdk.js * Update app/javascript/sdk/sdk.js Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
This commit is contained in:
parent
b0370ce44d
commit
2c3c1888f1
3 changed files with 38 additions and 0 deletions
|
@ -200,12 +200,23 @@ export default {
|
|||
unreadMessageCount,
|
||||
});
|
||||
this.setIframeHeight(this.isMobile);
|
||||
this.handleUnreadNotificationDot();
|
||||
}
|
||||
},
|
||||
unsetUnreadView() {
|
||||
if (this.isIFrame) {
|
||||
IFrameHelper.sendMessage({ event: 'resetUnreadMode' });
|
||||
this.setIframeHeight();
|
||||
this.handleUnreadNotificationDot();
|
||||
}
|
||||
},
|
||||
handleUnreadNotificationDot() {
|
||||
const { unreadMessageCount } = this;
|
||||
if (this.isIFrame) {
|
||||
IFrameHelper.sendMessage({
|
||||
event: 'handleNotificationDot',
|
||||
unreadMessageCount,
|
||||
});
|
||||
}
|
||||
},
|
||||
createWidgetEvents(message) {
|
||||
|
@ -281,6 +292,7 @@ export default {
|
|||
}
|
||||
this.showUnreadView = false;
|
||||
this.showCampaignView = false;
|
||||
this.handleUnreadNotificationDot();
|
||||
} else if (message.event === 'toggle-open') {
|
||||
this.isWidgetOpen = message.isOpen;
|
||||
this.toggleOpen();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue