fix prod build again + fetch lists (and follow request) on login,
stop fetching on logout, don't start fetching in components
This commit is contained in:
parent
50924aab5c
commit
ebe095bd76
|
@ -11,9 +11,6 @@ const Lists = {
|
||||||
ListsCard,
|
ListsCard,
|
||||||
ListsNew
|
ListsNew
|
||||||
},
|
},
|
||||||
created () {
|
|
||||||
this.$store.dispatch('startFetchingLists')
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
lists () {
|
lists () {
|
||||||
return this.$store.state.lists.allLists
|
return this.$store.state.lists.allLists
|
||||||
|
|
|
@ -1,20 +1,11 @@
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import NavigationEntry from 'src/components/navigation/navigation_entry.vue'
|
import NavigationEntry from 'src/components/navigation/navigation_entry.vue'
|
||||||
|
import { getListEntries } from 'src/components/navigation/filter.js'
|
||||||
export const getListEntries = state => state.lists.allLists.map(list => ({
|
|
||||||
name: 'list-' + list.id,
|
|
||||||
routeObject: { name: 'lists-timeline', params: { id: list.id } },
|
|
||||||
labelRaw: list.title,
|
|
||||||
iconLetter: list.title[0]
|
|
||||||
}))
|
|
||||||
|
|
||||||
export const ListsMenuContent = {
|
export const ListsMenuContent = {
|
||||||
props: [
|
props: [
|
||||||
'showPin'
|
'showPin'
|
||||||
],
|
],
|
||||||
created () {
|
|
||||||
this.$store.dispatch('startFetchingLists')
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
NavigationEntry
|
NavigationEntry
|
||||||
},
|
},
|
||||||
|
|
|
@ -36,9 +36,6 @@ library.add(
|
||||||
const NavPanel = {
|
const NavPanel = {
|
||||||
props: ['forceExpand'],
|
props: ['forceExpand'],
|
||||||
created () {
|
created () {
|
||||||
if (this.currentUser && this.currentUser.locked) {
|
|
||||||
this.$store.dispatch('startFetchingFollowRequests')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
ListsMenuContent,
|
ListsMenuContent,
|
||||||
|
|
|
@ -502,6 +502,7 @@ const users = {
|
||||||
store.dispatch('stopFetchingTimeline', 'friends')
|
store.dispatch('stopFetchingTimeline', 'friends')
|
||||||
store.commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))
|
store.commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))
|
||||||
store.dispatch('stopFetchingNotifications')
|
store.dispatch('stopFetchingNotifications')
|
||||||
|
store.dispatch('stopFetchingLists')
|
||||||
store.dispatch('stopFetchingFollowRequests')
|
store.dispatch('stopFetchingFollowRequests')
|
||||||
store.commit('clearNotifications')
|
store.commit('clearNotifications')
|
||||||
store.commit('resetStatuses')
|
store.commit('resetStatuses')
|
||||||
|
@ -556,6 +557,12 @@ const users = {
|
||||||
store.dispatch('startFetchingChats')
|
store.dispatch('startFetchingChats')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
store.dispatch('startFetchingLists')
|
||||||
|
|
||||||
|
if (user.locked) {
|
||||||
|
store.dispatch('startFetchingFollowRequests')
|
||||||
|
}
|
||||||
|
|
||||||
if (store.getters.mergedConfig.useStreamingApi) {
|
if (store.getters.mergedConfig.useStreamingApi) {
|
||||||
store.dispatch('fetchTimeline', 'friends', { since: null })
|
store.dispatch('fetchTimeline', 'friends', { since: null })
|
||||||
store.dispatch('fetchNotifications', { since: null })
|
store.dispatch('fetchNotifications', { since: null })
|
||||||
|
|
Loading…
Reference in New Issue