@chat21/chat21-ionic 3.4.21-rc3 → 3.4.21-rc4

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,6 +8,9 @@
8
8
  ### **Copyrigth**:
9
9
  *Tiledesk SRL*
10
10
 
11
+ # 3.4.21-rc4
12
+ - **added**: ability to init and decrement new conversation count badge
13
+
11
14
  # 3.4.21-rc3
12
15
  - **changed**: badge notification for agentDesktop
13
16
 
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.21-rc3",
4
+ "version": "3.4.21-rc4",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -1111,7 +1111,7 @@ export class AppComponent implements OnInit {
1111
1111
  if (conversation && conversation.is_new === true && this.isInitialized) {
1112
1112
  this.manageTabNotification('conv_added', conversation.sound)
1113
1113
  this.manageEventNewConversation(conversation)
1114
- this.manageNotification(conversation);
1114
+ this.setNotification();
1115
1115
  }
1116
1116
  if(conversation) this.updateConversationsOnStorage()
1117
1117
  });
@@ -1346,6 +1346,9 @@ export class AppComponent implements OnInit {
1346
1346
  subscribeConversationSelected= (conversation: ConversationModel) => {
1347
1347
  if(conversation && conversation.is_new){
1348
1348
  this.audio_NewConv.pause()
1349
+
1350
+ //UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1351
+ this.setNotification();
1349
1352
  }
1350
1353
  }
1351
1354
 
@@ -1421,6 +1424,9 @@ export class AppComponent implements OnInit {
1421
1424
  this.logger.debug('[APP-COMP]-CONVS - INIT CONV CONVS 2', conversations)
1422
1425
  this.events.publish('appcompSubscribeToConvs:loadingIsActive', false);
1423
1426
  }
1427
+
1428
+ //INIT NOTIFICATION FOR NEW CONVERSATION COUNT
1429
+ this.setNotification();
1424
1430
  });
1425
1431
 
1426
1432
  }
@@ -1637,8 +1643,8 @@ export class AppComponent implements OnInit {
1637
1643
  this.triggerEvents.triggerOnNewConversationInit(conversation)
1638
1644
  }
1639
1645
 
1640
- private manageNotification(conversation: ConversationModel) {
1641
- this.logger.log('[APP-COMP] manageNotification conversation', conversation);
1646
+ private setNotification() {
1647
+ this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION');
1642
1648
  if(window['AGENTDESKTOP']){
1643
1649
  this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP']);
1644
1650
  window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())