Commit bd07e5de authored by HJ's avatar HJ 🐼

unify showimmideately

parent 43197c42
Pipeline #21465 passed with stages
in 4 minutes and 4 seconds
...@@ -47,7 +47,8 @@ const api = { ...@@ -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 = { ...@@ -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'
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment