get rid of older messages when scrolling down in chat to keep it from bloating dom
This commit is contained in:
parent
aa240f935f
commit
47770ed715
3 changed files with 24 additions and 0 deletions
|
@ -115,6 +115,9 @@ const chats = {
|
|||
},
|
||||
handleMessageError ({ commit }, value) {
|
||||
commit('handleMessageError', { commit, ...value })
|
||||
},
|
||||
cullOlderMessages ({ commit }, chatId) {
|
||||
commit('cullOlderMessages', chatId)
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
|
@ -227,6 +230,9 @@ const chats = {
|
|||
handleMessageError (state, { chatId, fakeId, isRetry }) {
|
||||
const chatMessageService = state.openedChatMessageServices[chatId]
|
||||
chatService.handleMessageError(chatMessageService, fakeId, isRetry)
|
||||
},
|
||||
cullOlderMessages (state, chatId) {
|
||||
chatService.cullOlderMessages(state.openedChatMessageServices[chatId])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue