|
|
@ -1,4 +1,3 @@
|
|
|
|
import timelineFetcher from '../services/timeline_fetcher/timeline_fetcher.service.js'
|
|
|
|
|
|
|
|
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'
|
|
|
|
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'
|
|
|
|
import { compact, map, each, find, merge } from 'lodash'
|
|
|
|
import { compact, map, each, find, merge } from 'lodash'
|
|
|
|
import { set } from 'vue'
|
|
|
|
import { set } from 'vue'
|
|
|
@ -74,12 +73,12 @@ const users = {
|
|
|
|
commit('setCurrentUser', user)
|
|
|
|
commit('setCurrentUser', user)
|
|
|
|
commit('addNewUsers', [user])
|
|
|
|
commit('addNewUsers', [user])
|
|
|
|
|
|
|
|
|
|
|
|
// Start getting fresh tweets.
|
|
|
|
|
|
|
|
timelineFetcher.startFetching({store, credentials: userCredentials})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set our new backend interactor
|
|
|
|
// Set our new backend interactor
|
|
|
|
commit('setBackendInteractor', backendInteractorService(userCredentials))
|
|
|
|
commit('setBackendInteractor', backendInteractorService(userCredentials))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Start getting fresh tweets.
|
|
|
|
|
|
|
|
store.dispatch('startFetching', 'friends')
|
|
|
|
|
|
|
|
|
|
|
|
// Fetch our friends
|
|
|
|
// Fetch our friends
|
|
|
|
store.rootState.api.backendInteractor.fetchFriends()
|
|
|
|
store.rootState.api.backendInteractor.fetchFriends()
|
|
|
|
.then((friends) => commit('addNewUsers', friends))
|
|
|
|
.then((friends) => commit('addNewUsers', friends))
|
|
|
|