diff options
| author | Henry Jameson <me@hjkos.com> | 2018-12-04 09:56:45 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-12-04 09:56:45 +0300 |
| commit | 7a13c530c76586a56309bfd2347374ece345ad08 (patch) | |
| tree | e62868d2e10c49e00f7c65057323931c469afb1b /src/services/timeline_fetcher/timeline_fetcher.service.js | |
| parent | 6b3489a4d30b6530091919b4c44617a3294ffdd2 (diff) | |
| parent | 480f617c098c831e095a686abb319f4e467e15e4 (diff) | |
Merge remote-tracking branch 'upstream/develop' into search-mobile-fixes
* upstream/develop:
addressed PR comments
added tooltip
Add userId property to timelines so that we don't overwrite user timeline meant for another user
Added option to auto-hide subject field when it's empty.
removes hacks from notifications storage, adds api call to let server update is_seen attribute
fixes vimium not giving retweet button a hint
Diffstat (limited to 'src/services/timeline_fetcher/timeline_fetcher.service.js')
| -rw-r--r-- | src/services/timeline_fetcher/timeline_fetcher.service.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js index 0e3e32d2..c2a7de56 100644 --- a/src/services/timeline_fetcher/timeline_fetcher.service.js +++ b/src/services/timeline_fetcher/timeline_fetcher.service.js @@ -2,13 +2,14 @@ import { camelCase } from 'lodash' import apiService from '../api/api.service.js' -const update = ({store, statuses, timeline, showImmediately}) => { +const update = ({store, statuses, timeline, showImmediately, userId}) => { const ccTimeline = camelCase(timeline) store.dispatch('setError', { value: false }) store.dispatch('addNewStatuses', { timeline: ccTimeline, + userId, statuses, showImmediately }) @@ -33,7 +34,7 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false if (!older && statuses.length >= 20 && !timelineData.loading) { store.dispatch('queueFlush', { timeline: timeline, id: timelineData.maxId }) } - update({store, statuses, timeline, showImmediately}) + update({store, statuses, timeline, showImmediately, userId}) }, () => store.dispatch('setError', { value: true })) } @@ -41,6 +42,7 @@ const startFetching = ({timeline = 'friends', credentials, store, userId = false const rootState = store.rootState || store.state const timelineData = rootState.statuses.timelines[camelCase(timeline)] const showImmediately = timelineData.visibleStatuses.length === 0 + timelineData.userId = userId fetchAndUpdate({timeline, credentials, store, showImmediately, userId, tag}) const boundFetchAndUpdate = () => fetchAndUpdate({ timeline, credentials, store, userId, tag }) return setInterval(boundFetchAndUpdate, 10000) |
