@chat21/chat21-ionic 3.4.27-rc16 → 3.4.27-rc17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,8 +8,12 @@
8
8
  ### **Copyrigth**:
9
9
  *Tiledesk SRL*
10
10
 
11
+ # 3.4.27-rc17
12
+ - **bug-fixed**: setNotification not called when click on a conversation
13
+
11
14
  # 3.4.27-rc16
12
-
15
+ - **bug-fixed**: setNotification not called when resolve a conversation
16
+
13
17
  # 3.4.27-rc15
14
18
  - **changed**: /images with /img in assets folder
15
19
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.4.27-rc16",
4
+ "version": "3.4.27-rc17",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -1125,6 +1125,7 @@ export class AppComponent implements OnInit {
1125
1125
  if (conversation && conversation.is_new === true && this.isInitialized) {
1126
1126
  this.manageTabNotification('conv_added', conversation.sound)
1127
1127
  this.manageEventNewConversation(conversation)
1128
+ //UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1128
1129
  this.setNotification();
1129
1130
  }
1130
1131
  if(conversation) this.updateConversationsOnStorage()
@@ -1132,7 +1133,11 @@ export class AppComponent implements OnInit {
1132
1133
 
1133
1134
  this.conversationsHandlerService.conversationChanged.subscribe((conversation: ConversationModel) => {
1134
1135
  // 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
+ }
1136
1141
  });
1137
1142
 
1138
1143
  this.conversationsHandlerService.conversationChangedDetailed.subscribe((changes: {value: ConversationModel, previousValue: ConversationModel}) => {
@@ -1156,6 +1161,7 @@ export class AppComponent implements OnInit {
1156
1161
  if(conversation) {
1157
1162
  this.updateConversationsOnStorage();
1158
1163
  this.segmentResolved(conversation);
1164
+ //UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1159
1165
  this.setNotification();
1160
1166
  this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
1161
1167
  }
@@ -1282,9 +1288,9 @@ export class AppComponent implements OnInit {
1282
1288
  }
1283
1289
 
1284
1290
  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();
1288
1294
  }
1289
1295
 
1290
1296
  connetWebsocket(tiledeskToken) {
@@ -1400,8 +1406,6 @@ export class AppComponent implements OnInit {
1400
1406
  if(conversation && conversation.is_new){
1401
1407
  this.audio_NewConv.pause();
1402
1408
  this.conversationsHandlerService.setConversationRead(conversation.uid)
1403
- //UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1404
- this.setNotification();
1405
1409
  }
1406
1410
  }
1407
1411
 
@@ -1697,7 +1701,7 @@ export class AppComponent implements OnInit {
1697
1701
  }
1698
1702
 
1699
1703
  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());
1701
1705
  if(window['AGENTDESKTOP']){
1702
1706
  this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP'], this.conversationsHandlerService.countIsNew().toString());
1703
1707
  window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())