@aochuang/client-sdk 1.0.362 → 1.0.363

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aochuang/client-sdk",
3
- "version": "1.0.362",
3
+ "version": "1.0.363",
4
4
  "description": "",
5
5
  "files": [
6
6
  "common",
@@ -465,6 +465,9 @@ export default class ClientChatSession {
465
465
  }
466
466
  }
467
467
  delete this.sessionMap[id]
468
+ if (this.data.currentSessionId === id) {
469
+ this.data.currentSessionId = null
470
+ }
468
471
  if (checkLastUpdateSession !== false) {
469
472
  // todo 后面可能会删掉这块的逻辑,因为后端排序逻辑变了
470
473
  this.checkAndUpdateLastUpdateSession()
@@ -609,7 +612,9 @@ export default class ClientChatSession {
609
612
  return true
610
613
  }
611
614
  })
612
- this.data.sessionGroupData[groupField][topField][oldSortFields.day][oldSortFields.milliseconds].splice(index, 1)
615
+ if (index >= 0) {
616
+ this.data.sessionGroupData[groupField][topField][oldSortFields.day][oldSortFields.milliseconds].splice(index, 1)
617
+ }
613
618
  }
614
619
  })
615
620
  // 按照新的时间来分组排序
@@ -682,7 +687,9 @@ export default class ClientChatSession {
682
687
  return true
683
688
  }
684
689
  })
685
- this.data.sessionGroupData[groupField][topField][sortFields.day][sortFields.milliseconds].splice(index, 1)
690
+ if (index >= 0) {
691
+ this.data.sessionGroupData[groupField][topField][sortFields.day][sortFields.milliseconds].splice(index, 1)
692
+ }
686
693
  }
687
694
  })
688
695
  // 所有的