Move addNewStatuses code around.
This commit is contained in:
parent
47ddf8c3fb
commit
281c71b191
@ -99,8 +99,7 @@ const mergeOrAdd = (arr, item) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
addNewStatuses (state, { statuses, showImmediately = false, timeline, user = {} }) {
|
||||
const addNewStatuses = (state, { statuses, showImmediately = false, timeline, user = {} }) => {
|
||||
const allStatuses = state.allStatuses
|
||||
const timelineObject = state.timelines[timeline]
|
||||
|
||||
@ -193,7 +192,10 @@ export const mutations = {
|
||||
timelineObject.visibleStatuses = sortBy(timelineObject.visibleStatuses, ({id}) => -id)
|
||||
timelineObject.statuses = sortBy(timelineObject.statuses, ({id}) => -id)
|
||||
timelineObject.minVisibleId = (last(timelineObject.statuses) || {}).id
|
||||
},
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
addNewStatuses,
|
||||
showNewStatuses (state, { timeline }) {
|
||||
const oldTimeline = (state.timelines[timeline])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user