maintain conversationsObject storage
This commit is contained in:
parent
fa16d66c52
commit
ab7a418d80
2 changed files with 40 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
import { reduce, filter, findIndex } from 'lodash'
|
||||
import { reduce, filter, findIndex, clone } from 'lodash'
|
||||
import Status from '../status/status.vue'
|
||||
|
||||
const sortById = (a, b) => {
|
||||
|
@ -75,9 +75,7 @@ const conversation = {
|
|||
return [this.status]
|
||||
}
|
||||
|
||||
const statuses = this.$store.state.statuses.allStatuses
|
||||
const conversation = filter(statuses, { statusnet_conversation_id: this.conversationId })
|
||||
|
||||
const conversation = clone(this.$store.state.statuses.conversationsObject[this.conversationId])
|
||||
const statusIndex = findIndex(conversation, { id: this.statusId })
|
||||
if (statusIndex !== -1) {
|
||||
conversation[statusIndex] = this.status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue