From a196c3551a1a44660c2f9c4ee940bb988782e929 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 21 Aug 2018 00:21:35 +0300 Subject: [PATCH] Revert "Drop the entire thing about hidden "own" timeline since it doesn't necessarily" This reverts commit 612aa56c8b2d6bae75bd47ff1846dfcfb012d525. --- src/modules/statuses.js | 1 + src/modules/users.js | 2 ++ src/services/api/api.service.js | 3 +++ .../backend_interactor_service/backend_interactor_service.js | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 8e1e7fe7..ff2cb098 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -38,6 +38,7 @@ export const defaultState = { mentions: emptyTl(), public: emptyTl(), user: emptyTl(), + own: emptyTl(), publicAndExternal: emptyTl(), friends: emptyTl(), tag: emptyTl() diff --git a/src/modules/users.js b/src/modules/users.js index ba548765..c592fe4e 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -107,6 +107,8 @@ const users = { // Start getting fresh tweets. store.dispatch('startFetching', 'friends') + // Start getting our own posts, only really needed for mitigating broken favorites + store.dispatch('startFetching', ['own', user.id]) // Get user mutes and follower info store.rootState.api.backendInteractor.fetchMutes().then((mutedUsers) => { diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 4f6af06d..1cb5e0b8 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -306,6 +306,9 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use notifications: QVITTER_USER_NOTIFICATIONS_URL, 'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL, user: QVITTER_USER_TIMELINE_URL, + // separate timeline for own posts, so it won't break due to user timeline bugs + // really needed only for broken favorites + own: QVITTER_USER_TIMELINE_URL, tag: TAG_TIMELINE_URL } diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js index 5742441c..c84373ac 100644 --- a/src/services/backend_interactor_service/backend_interactor_service.js +++ b/src/services/backend_interactor_service/backend_interactor_service.js @@ -54,11 +54,11 @@ const backendInteractorService = (credentials) => { return timelineFetcherService.startFetching({timeline, store, credentials, userId}) } - const fetchOldPost = ({store, postId, timeline = 'friends'}) => { + const fetchOldPost = ({store, postId}) => { return timelineFetcherService.fetchAndUpdate({ store, credentials, - timeline, + timeline: 'own', older: true, until: postId + 1 })