Fix tests, more replacing with mergedConfig
This commit is contained in:
parent
20fc259350
commit
0be86304d2
19 changed files with 56 additions and 49 deletions
|
@ -8,11 +8,10 @@ const update = ({ store, notifications, older }) => {
|
|||
|
||||
const fetchAndUpdate = ({ store, credentials, older = false }) => {
|
||||
const args = { credentials }
|
||||
const { getters } = store
|
||||
const rootState = store.rootState || store.state
|
||||
const timelineData = rootState.statuses.notifications
|
||||
const hideMutedPosts = typeof rootState.config.hideMutedPosts === 'undefined'
|
||||
? rootState.instance.hideMutedPosts
|
||||
: rootState.config.hideMutedPosts
|
||||
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
|
||||
|
||||
args['withMuted'] = !hideMutedPosts
|
||||
|
||||
|
|
|
@ -15,13 +15,21 @@ const update = ({ store, statuses, timeline, showImmediately, userId }) => {
|
|||
})
|
||||
}
|
||||
|
||||
const fetchAndUpdate = ({ store, credentials, timeline = 'friends', older = false, showImmediately = false, userId = false, tag = false, until }) => {
|
||||
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 { getters } = store
|
||||
const timelineData = rootState.statuses.timelines[camelCase(timeline)]
|
||||
const hideMutedPosts = typeof rootState.config.hideMutedPosts === 'undefined'
|
||||
? rootState.instance.hideMutedPosts
|
||||
: rootState.config.hideMutedPosts
|
||||
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
|
||||
|
||||
if (older) {
|
||||
args['until'] = until || timelineData.minId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue