diff options
| author | lambda <pleromagit@rogerbraun.net> | 2017-11-24 07:30:17 +0000 |
|---|---|---|
| committer | lambda <pleromagit@rogerbraun.net> | 2017-11-24 07:30:17 +0000 |
| commit | 2431d35277b0c7c761bf080f0bfffa654ee4b182 (patch) | |
| tree | b88d02bfb78b4f733e71f975c5da9203468f20da /src/modules/statuses.js | |
| parent | 38cab5e4b695eea90b01c2866976960e9fc01128 (diff) | |
| parent | 6b773902e8dae36b2c4cf4c970fd1437cfdc13bc (diff) | |
Merge branch 'feature/flush-timeline-with-holes' into 'develop'
Clear timeline when there's holes between old and new
Closes #54
See merge request pleroma/pleroma-fe!171
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index d954b023..18191424 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -22,7 +22,8 @@ export const defaultState = { loading: false, followers: [], friends: [], - viewing: 'statuses' + viewing: 'statuses', + flushMarker: 0 }, public: { statuses: [], @@ -36,7 +37,8 @@ export const defaultState = { loading: false, followers: [], friends: [], - viewing: 'statuses' + viewing: 'statuses', + flushMarker: 0 }, user: { statuses: [], @@ -50,7 +52,8 @@ export const defaultState = { loading: false, followers: [], friends: [], - viewing: 'statuses' + viewing: 'statuses', + flushMarker: 0 }, publicAndExternal: { statuses: [], @@ -64,7 +67,8 @@ export const defaultState = { loading: false, followers: [], friends: [], - viewing: 'statuses' + viewing: 'statuses', + flushMarker: 0 }, friends: { statuses: [], @@ -78,7 +82,8 @@ export const defaultState = { loading: false, followers: [], friends: [], - viewing: 'statuses' + viewing: 'statuses', + flushMarker: 0 }, tag: { statuses: [], @@ -92,7 +97,8 @@ export const defaultState = { loading: false, followers: [], friends: [], - viewing: 'statuses' + viewing: 'statuses', + flushMarker: 0 } } } @@ -381,7 +387,8 @@ export const mutations = { loading: false, followers: [], friends: [], - viewing: 'statuses' + viewing: 'statuses', + flushMarker: 0 } state.timelines[timeline] = emptyTimeline @@ -422,6 +429,9 @@ export const mutations = { each(notifications, (notification) => { notification.seen = true }) + }, + queueFlush (state, { timeline, id }) { + state.timelines[timeline].flushMarker = id } } @@ -458,6 +468,9 @@ const statuses = { // Optimistic retweeting... commit('setRetweeted', { status, value: true }) apiService.retweet({ id: status.id, credentials: rootState.users.currentUser.credentials }) + }, + queueFlush ({ rootState, commit }, { timeline, id }) { + commit('queueFlush', { timeline, id }) } }, mutations |
