diff options
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 5f09b8f5..9b11a13e 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -146,7 +146,8 @@ const removeStatusFromGlobalStorage = (state, status) => { } } -const addNewStatuses = (state, { statuses, showImmediately = false, timeline, user = {}, noIdUpdate = false, userId }) => { +const addNewStatuses = (state, { statuses, showImmediately = false, timeline, user = {}, + noIdUpdate = false, userId }) => { // Sanity check if (!isArray(statuses)) { return false @@ -543,7 +544,7 @@ const statuses = { }, fetchPinnedStatuses ({ rootState, dispatch }, userId) { rootState.api.backendInteractor.fetchPinnedStatuses(userId) - .then(statuses => dispatch('addNewStatuses', { statuses, timeline: 'user', userId, showImmediately: true })) + .then(statuses => dispatch('addNewStatuses', { statuses, timeline: 'user', userId, showImmediately: true, noIdUpdate: true })) }, pinStatus ({ rootState, commit }, statusId) { return rootState.api.backendInteractor.pinOwnStatus(statusId) @@ -582,18 +583,6 @@ const statuses = { ]).then(([favoritedByUsers, rebloggedByUsers]) => commit('addFavsAndRepeats', { id, favoritedByUsers, rebloggedByUsers }) ) - }, - votePoll ({ rootState, commit }, { id, pollId, choices }) { - return rootState.api.backendInteractor.vote(pollId, choices).then(poll => { - commit('updateStatusWithPoll', { id, poll }) - return poll - }) - }, - refreshPoll ({ rootState, commit }, { id, pollId }) { - return rootState.api.backendInteractor.fetchPoll(pollId).then(poll => { - commit('updateStatusWithPoll', { id, poll }) - return poll - }) } }, mutations |
