Commit a08b2362 by 杨铁龙

客户端打开会话后刷新消息列表

parent a2b13d43
Showing with 3 additions and 1 deletions
......@@ -312,7 +312,7 @@ export default {
[ChatStore.MUTATION_CHAT_UPDATE_USER_TYPE]: (state, v: string) => {
state[ChatStore.STATE_CHAT_CURRENT_USER_TYPE] = v;
},
[ChatStore.MUTATION_SAVE_USERNAME]: (state, param: {id: string, name: string}) => {
[ChatStore.MUTATION_SAVE_USERNAME]: (state, param: { id: string, name: string }) => {
Vue.set(state[ChatStore.STATE_CHAT_USERNAME], param.id, param.name);
},
},
......@@ -461,6 +461,8 @@ export default {
const chatId = Number(imChatId);
await commit(ChatStore.MUTATION_SHOW_CHAT, true);
await dispatch(ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, chatId);
// 打开会话后获取一下会话列表,刷新未读消息
dispatch(ChatStore.ACTION_GET_MY_CHAT_LIST);
},
async [ChatStore.ACTION_REGISTER_EVENT]({ dispatch, commit, state }) {
const onNewMsg = (e: Message) => {
......
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