Updated streaming and improved error-handling, some more refactoring to api
This commit is contained in:
parent
172ebaf4e6
commit
ff95d865d2
7 changed files with 84 additions and 40 deletions
src/modules
|
@ -431,10 +431,10 @@ const users = {
|
|||
store.commit('clearCurrentUser')
|
||||
store.dispatch('disconnectFromSocket')
|
||||
store.commit('clearToken')
|
||||
store.dispatch('stopFetching', 'friends')
|
||||
store.dispatch('stopFetchingTimeline', 'friends')
|
||||
store.commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))
|
||||
store.dispatch('stopFetching', 'notifications')
|
||||
store.dispatch('stopFetching', 'followRequest')
|
||||
store.dispatch('stopFetchingNotifications')
|
||||
store.dispatch('stopFetchingFollowRequests')
|
||||
store.commit('clearNotifications')
|
||||
store.commit('resetStatuses')
|
||||
})
|
||||
|
@ -469,7 +469,7 @@ const users = {
|
|||
store.dispatch('initializeSocket')
|
||||
}
|
||||
|
||||
store.dispatch('startMastoSocket').catch((error) => {
|
||||
store.dispatch('startMastoUserSocket').catch((error) => {
|
||||
console.error('Failed initializing MastoAPI Streaming socket', error)
|
||||
// Start getting fresh posts.
|
||||
store.dispatch('startFetchingTimeline', { timeline: 'friends' })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue