Feature: Improve label experience (#975)
Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -8,7 +8,7 @@ const actions = {
|
||||
getConversation: async ({ commit }, conversationId) => {
|
||||
try {
|
||||
const response = await ConversationApi.show(conversationId);
|
||||
commit(types.default.ADD_CONVERSATION, response.data);
|
||||
commit(types.default.UPDATE_CONVERSATION, response.data);
|
||||
commit(
|
||||
`contacts/${types.default.SET_CONTACT_ITEM}`,
|
||||
response.data.meta.sender
|
||||
@@ -26,6 +26,7 @@ const actions = {
|
||||
const { payload: chatList, meta: metaData } = data;
|
||||
commit(types.default.SET_ALL_CONVERSATION, chatList);
|
||||
dispatch('conversationStats/set', metaData);
|
||||
dispatch('conversationLabels/setBulkConversationLabels', chatList);
|
||||
commit(types.default.CLEAR_LIST_LOADING_STATUS);
|
||||
commit(
|
||||
`contacts/${types.default.SET_CONTACTS}`,
|
||||
|
||||
@@ -142,13 +142,15 @@ const mutations = {
|
||||
if (currentConversationIndex > -1) {
|
||||
const currentConversation = {
|
||||
...allConversations[currentConversationIndex],
|
||||
status: conversation.status,
|
||||
...conversation,
|
||||
};
|
||||
Vue.set(allConversations, currentConversationIndex, currentConversation);
|
||||
if (_state.selectedChat.id === conversation.id) {
|
||||
_state.selectedChat.status = conversation.status;
|
||||
window.bus.$emit('scrollToMessage');
|
||||
}
|
||||
} else {
|
||||
_state.allConversations.push(conversation);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -190,7 +192,7 @@ const mutations = {
|
||||
},
|
||||
|
||||
[types.default.SET_ACTIVE_INBOX](_state, inboxId) {
|
||||
_state.currentInbox = inboxId;
|
||||
_state.currentInbox = inboxId ? parseInt(inboxId, 10) : null;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user