Skip to content

Commit a35ebc9

Browse files
author
Gabriele Panico
committed
Merge branch 'features/agentDesktopSDK-PRE' into master-PRE
2 parents ff34719 + 3611e1d commit a35ebc9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/app/app.component.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,14 +1125,19 @@ export class AppComponent implements OnInit {
11251125
if (conversation && conversation.is_new === true && this.isInitialized) {
11261126
this.manageTabNotification('conv_added', conversation.sound)
11271127
this.manageEventNewConversation(conversation)
1128+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
11281129
this.setNotification();
11291130
}
11301131
if(conversation) this.updateConversationsOnStorage()
11311132
});
11321133

11331134
this.conversationsHandlerService.conversationChanged.subscribe((conversation: ConversationModel) => {
11341135
// console.log('[APP-COMP] ***** subscribeConversationChanged conversation: ', conversation);
1135-
if(conversation) this.updateConversationsOnStorage();
1136+
if(conversation){
1137+
this.updateConversationsOnStorage();
1138+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1139+
this.setNotification();
1140+
}
11361141
});
11371142

11381143
this.conversationsHandlerService.conversationChangedDetailed.subscribe((changes: {value: ConversationModel, previousValue: ConversationModel}) => {
@@ -1156,6 +1161,7 @@ export class AppComponent implements OnInit {
11561161
if(conversation) {
11571162
this.updateConversationsOnStorage();
11581163
this.segmentResolved(conversation);
1164+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
11591165
this.setNotification();
11601166
this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
11611167
}
@@ -1282,9 +1288,9 @@ export class AppComponent implements OnInit {
12821288
}
12831289

12841290
goToDashboardLogin(){
1285-
let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
1286-
const myWindow = window.open(DASHBOARD_URL, '_self');
1287-
myWindow.focus();
1291+
// let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
1292+
// const myWindow = window.open(DASHBOARD_URL, '_self');
1293+
// myWindow.focus();
12881294
}
12891295

12901296
connetWebsocket(tiledeskToken) {
@@ -1400,8 +1406,6 @@ export class AppComponent implements OnInit {
14001406
if(conversation && conversation.is_new){
14011407
this.audio_NewConv.pause();
14021408
this.conversationsHandlerService.setConversationRead(conversation.uid)
1403-
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1404-
this.setNotification();
14051409
}
14061410
}
14071411

@@ -1697,7 +1701,7 @@ export class AppComponent implements OnInit {
16971701
}
16981702

16991703
private setNotification() {
1700-
this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION');
1704+
this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION', this.conversationsHandlerService.countIsNew().toString());
17011705
if(window['AGENTDESKTOP']){
17021706
this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP'], this.conversationsHandlerService.countIsNew().toString());
17031707
window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())

0 commit comments

Comments
 (0)