some initial work to make it possible to use "unregistered" timelines, i.e. not
reserving a timeline by name, instead just passing timeline object itself.
This commit is contained in:
parent
1fb9ceb59b
commit
039a407400
7 changed files with 43 additions and 31 deletions
|
@ -3,7 +3,7 @@ import { camelCase } from 'lodash'
|
|||
import apiService from '../api/api.service.js'
|
||||
|
||||
const update = ({store, statuses, timeline, showImmediately, userId}) => {
|
||||
const ccTimeline = camelCase(timeline)
|
||||
const ccTimeline = typeof timeline === 'object' ? timeline : camelCase(timeline)
|
||||
|
||||
store.dispatch('setError', { value: false })
|
||||
|
||||
|
@ -18,7 +18,7 @@ const update = ({store, statuses, timeline, showImmediately, userId}) => {
|
|||
const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false, showImmediately = false, userId = false, tag = false, until}) => {
|
||||
const args = { timeline, credentials }
|
||||
const rootState = store.rootState || store.state
|
||||
const timelineData = rootState.statuses.timelines[camelCase(timeline)]
|
||||
const timelineData = typeof timeline === 'object' ? timeline : rootState.statuses.timelines[camelCase(timeline)]
|
||||
|
||||
if (older) {
|
||||
args['until'] = until || timelineData.minVisibleId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue