@aochuang/client-sdk 1.0.319 → 1.0.320
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
|
@@ -901,9 +901,11 @@ class ClientChat {
|
|
|
901
901
|
rs[v.wechatAccountId] = true
|
|
902
902
|
return rs
|
|
903
903
|
}, {}))
|
|
904
|
+
const changeFriendMap = {}
|
|
904
905
|
// 删除changeType为3移除的好友,例如转移的场景
|
|
905
906
|
if (data.friends && data.friends.length) {
|
|
906
907
|
data.friends.forEach(friend => {
|
|
908
|
+
changeFriendMap[friend.wechatFriendId] = friend
|
|
907
909
|
if (friend.changeType === 3) {
|
|
908
910
|
const removedFriend = this.contacts.removeFriend(friend.wechatFriendId)
|
|
909
911
|
if (!removedFriend) {
|
|
@@ -924,6 +926,13 @@ class ClientChat {
|
|
|
924
926
|
ps = this.account.reloadData()
|
|
925
927
|
}
|
|
926
928
|
}
|
|
929
|
+
// 这里还需要刷新一下当前会话选中的好友
|
|
930
|
+
if (this.sessionManage.currentSession && changeFriendMap[this.sessionManage.currentSession.targetId]) {
|
|
931
|
+
const sessionFriendId = this.sessionManage.currentSession.targetId
|
|
932
|
+
ps = ps.then(() => {
|
|
933
|
+
return this.contacts.getFriend(sessionFriendId, true)
|
|
934
|
+
})
|
|
935
|
+
}
|
|
927
936
|
return ps.finally(() => {
|
|
928
937
|
// 这里应该标记那些工作微信号的通讯录修改了,后面要在界面打个提示,告诉用户通讯录变化了,让手动刷新一下
|
|
929
938
|
// 同时也将缓存都清理一下,例如工作微信号分组统计数量等
|