aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-08-15 23:31:05 +0300
committerHenry Jameson <me@hjkos.com>2022-08-15 23:31:05 +0300
commitbbd99dc3cf5e4877c9f2cb824c0ca74a681c2fa0 (patch)
treed119f62f2fa4d627a20a82b372b443999e88a2fb
parent50f5afbce1f2bc4dbd0ddf6c951c7e519dfc6ce3 (diff)
fix
-rw-r--r--src/components/lists_timeline/lists_timeline.js4
-rw-r--r--src/components/nav_panel/nav_panel.js3
-rw-r--r--src/components/navigation/filter.js2
-rw-r--r--src/modules/lists.js8
4 files changed, 8 insertions, 9 deletions
diff --git a/src/components/lists_timeline/lists_timeline.js b/src/components/lists_timeline/lists_timeline.js
index 7534420d..c3f408bd 100644
--- a/src/components/lists_timeline/lists_timeline.js
+++ b/src/components/lists_timeline/lists_timeline.js
@@ -17,14 +17,14 @@ const ListsTimeline = {
this.listId = route.params.id
this.$store.dispatch('stopFetchingTimeline', 'list')
this.$store.commit('clearTimeline', { timeline: 'list' })
- this.$store.dispatch('fetchList', { id: this.listId })
+ this.$store.dispatch('fetchList', { listId: this.listId })
this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId })
}
}
},
created () {
this.listId = this.$route.params.id
- this.$store.dispatch('fetchList', { id: this.listId })
+ this.$store.dispatch('fetchList', { listId: this.listId })
this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId })
},
unmounted () {
diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js
index 1e68561f..b54f2fa2 100644
--- a/src/components/nav_panel/nav_panel.js
+++ b/src/components/nav_panel/nav_panel.js
@@ -1,7 +1,7 @@
import ListsMenuContent from 'src/components/lists_menu/lists_menu_content.vue'
import { mapState, mapGetters } from 'vuex'
import { TIMELINES, ROOT_ITEMS } from 'src/components/navigation/navigation.js'
-import { getListEntries, filterNavigation } from 'src/components/navigation/filter.js'
+import { filterNavigation } from 'src/components/navigation/filter.js'
import NavigationEntry from 'src/components/navigation/navigation_entry.vue'
import NavigationPins from 'src/components/navigation/navigation_pins.vue'
import Checkbox from 'src/components/checkbox/checkbox.vue'
@@ -81,7 +81,6 @@ const NavPanel = {
},
computed: {
...mapState({
- lists: getListEntries,
currentUser: state => state.users.currentUser,
followRequestCount: state => state.api.followRequests.length,
privateMode: state => state.instance.private,
diff --git a/src/components/navigation/filter.js b/src/components/navigation/filter.js
index 31b55486..71661d6f 100644
--- a/src/components/navigation/filter.js
+++ b/src/components/navigation/filter.js
@@ -10,7 +10,7 @@ export const filterNavigation = (list = [], { hasChats, isFederating, isPrivate,
})
}
-export const getListEntries = state => state.lists.allLists.map(list => ({
+export const getListEntries = state => console.log(state.lists) || state.lists.allLists.map(list => ({
name: 'list-' + list.id,
routeObject: { name: 'lists-timeline', params: { id: list.id } },
labelRaw: list.title,
diff --git a/src/modules/lists.js b/src/modules/lists.js
index 5c9432ad..d9fab969 100644
--- a/src/modules/lists.js
+++ b/src/modules/lists.js
@@ -15,10 +15,10 @@ export const mutations = {
}
state.allListsObject[listId].title = title
- if (!find(state.allLists, { listId })) {
- state.allLists.push({ listId, title })
+ if (!find(state.allLists, { id: listId })) {
+ state.allLists.push({ id: listId, title })
} else {
- find(state.allLists, { listId }).title = title
+ find(state.allLists, { id: listId }).title = title
}
},
setListAccounts (state, { listId, accountIds }) {
@@ -61,7 +61,7 @@ const actions = {
},
fetchList ({ rootState, commit }, { listId }) {
return rootState.api.backendInteractor.getList({ listId })
- .then((list) => commit('setList', { id: list.id, title: list.title }))
+ .then((list) => commit('setList', { listId: list.id, title: list.title }))
},
fetchListAccounts ({ rootState, commit }, { listId }) {
return rootState.api.backendInteractor.getListAccounts({ listId })