MCPcopy
hub / github.com/agalwood/Motrix / fetchList

Function fetchList

src/renderer/store/modules/task.js:60–70  ·  view source on GitHub ↗
({ commit, state })

Source from the content-addressed store, hash-verified

58 dispatch('fetchList')
59 },
60 fetchList ({ commit, state }) {
61 return api.fetchTaskList({ type: state.currentList })
62 .then((data) => {
63 commit('UPDATE_TASK_LIST', data)
64
65 const { selectedGidList } = state
66 const gids = data.map((task) => task.gid)
67 const list = intersection(selectedGidList, gids)
68 commit('UPDATE_SELECTED_GID_LIST', list)
69 })
70 },
71 selectTasks ({ commit }, list) {
72 commit('UPDATE_SELECTED_GID_LIST', list)
73 },

Callers

nothing calls this directly

Calls 3

intersectionFunction · 0.90
fetchTaskListMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected