diff options
| author | Wyatt Benno <wyattbenno@gmail.com> | 2019-06-24 12:01:13 +0900 |
|---|---|---|
| committer | Wyatt Benno <wyattbenno@gmail.com> | 2019-06-24 12:01:13 +0900 |
| commit | 7a5d06a6cf02e9df82d5479e27a86c26507ace58 (patch) | |
| tree | 59eed270742b360b28a0e4626809bfb88c04e38c /src/modules/statuses.js | |
| parent | a1c50c3fc1a8613c0c6dec9d366808a32b09bda4 (diff) | |
change isPinned to noIdUpdate
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 4fcfcdd2..262ff80a 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -147,7 +147,7 @@ const removeStatusFromGlobalStorage = (state, status) => { } const addNewStatuses = (state, { statuses, showImmediately = false, timeline, user = {}, - noIdUpdate = false, userId, isPinned = false }) => { + noIdUpdate = false, userId }) => { // Sanity check if (!isArray(statuses)) { return false @@ -161,10 +161,10 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us const newer = timeline && (maxNew > timelineObject.maxId || timelineObject.maxId === 0) && statuses.length > 0 const older = timeline && (minNew < timelineObject.minId || timelineObject.minId === 0) && statuses.length > 0 - if (!noIdUpdate && newer && !isPinned) { + if (!noIdUpdate && newer) { timelineObject.maxId = maxNew } - if (!noIdUpdate && older && !isPinned) { + if (!noIdUpdate && older) { timelineObject.minId = minNew } @@ -505,8 +505,8 @@ export const mutations = { const statuses = { state: defaultState(), actions: { - addNewStatuses ({ rootState, commit }, { statuses, showImmediately = false, timeline = false, noIdUpdate = false, userId, isPinned = false }) { - commit('addNewStatuses', { statuses, showImmediately, timeline, noIdUpdate, user: rootState.users.currentUser, userId, isPinned }) + addNewStatuses ({ rootState, commit }, { statuses, showImmediately = false, timeline = false, noIdUpdate = false, userId }) { + commit('addNewStatuses', { statuses, showImmediately, timeline, noIdUpdate, user: rootState.users.currentUser, userId }) }, addNewNotifications ({ rootState, commit, dispatch, rootGetters }, { notifications, older }) { commit('addNewNotifications', { visibleNotificationTypes: visibleNotificationTypes(rootState), dispatch, notifications, older, rootGetters }) @@ -544,7 +544,7 @@ const statuses = { }, fetchPinnedStatuses ({ rootState, dispatch }, userId) { rootState.api.backendInteractor.fetchPinnedStatuses(userId) - .then(statuses => dispatch('addNewStatuses', { statuses, timeline: 'user', userId, showImmediately: true, isPinned: true })) + .then(statuses => dispatch('addNewStatuses', { statuses, timeline: 'user', userId, showImmediately: true, noIdUpdate: true })) }, pinStatus ({ rootState, commit }, statusId) { return rootState.api.backendInteractor.pinOwnStatus(statusId) |
