unify showimmideately
This commit is contained in:
parent
43197c4243
commit
bd07e5de1c
1 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,8 @@ const api = {
|
||||||
startMastoUserSocket (store) {
|
startMastoUserSocket (store) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const { state, dispatch } = store
|
const { state, dispatch, rootState } = store
|
||||||
|
const timelineData = rootState.statuses.timelines.friends
|
||||||
state.mastoUserSocket = state.backendInteractor.startUserSocket({ store })
|
state.mastoUserSocket = state.backendInteractor.startUserSocket({ store })
|
||||||
state.mastoUserSocket.addEventListener(
|
state.mastoUserSocket.addEventListener(
|
||||||
'message',
|
'message',
|
||||||
|
@ -62,7 +63,7 @@ const api = {
|
||||||
dispatch('addNewStatuses', {
|
dispatch('addNewStatuses', {
|
||||||
statuses: [message.status],
|
statuses: [message.status],
|
||||||
userId: false,
|
userId: false,
|
||||||
showImmediately: false,
|
showImmediately: timelineData.visibleStatuses.length === 0,
|
||||||
timeline: 'friends'
|
timeline: 'friends'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue