Commit 2155b785 by 杨铁龙

fix: 小程序点击消息刷新消息列表不及时

parent 47f04293
Showing with 2 additions and 4 deletions
...@@ -787,9 +787,7 @@ export default { ...@@ -787,9 +787,7 @@ export default {
if (!chatId) { if (!chatId) {
return; return;
} }
const chatList = state[ const chatList = state[ChatStore.STATE_MY_CHAT_ROOM_LIST];
ChatStore.STATE_MY_CHAT_ROOM_LIST
] as ChatType[];
let wantedChatRoom = chatList.find(k => k.chat_id === chatId); let wantedChatRoom = chatList.find(k => k.chat_id === chatId);
if (!wantedChatRoom) { if (!wantedChatRoom) {
...@@ -828,12 +826,12 @@ export default { ...@@ -828,12 +826,12 @@ export default {
ChatStore.MUTATION_SAVE_CURRENT_CHAT_UNIPLAT_ID, ChatStore.MUTATION_SAVE_CURRENT_CHAT_UNIPLAT_ID,
info.uniplatId info.uniplatId
); );
dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS);
}) })
.catch(console.error); .catch(console.error);
commit(ChatStore.MUTATION_INITING_CHAT); commit(ChatStore.MUTATION_INITING_CHAT);
removeRegisterChatEvents.forEach(k => k()); removeRegisterChatEvents.forEach(k => k());
removeRegisterChatEvents = []; removeRegisterChatEvents = [];
await dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS);
try { try {
await Promise.all([ await Promise.all([
dispatch(ChatStore.ACTION_REGISTER_EVENT), dispatch(ChatStore.ACTION_REGISTER_EVENT),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment