From 612aa56c8b2d6bae75bd47ff1846dfcfb012d525 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 20 Aug 2018 19:01:54 +0300 Subject: [PATCH] Drop the entire thing about hidden "own" timeline since it doesn't necessarily contain all of the users posts (it doesn't contain DMs) even though it's "us". Since this is a workaround anyway just fetch home timeline instead. It could end up making more queries if user doesn't post that often. --- 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, 2 insertions(+), 8 deletions(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 45dd3afa..1e1bf72f 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -36,7 +36,6 @@ 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 c592fe4e..ba548765 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -107,8 +107,6 @@ 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 1cb5e0b8..4f6af06d 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -306,9 +306,6 @@ 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 c84373ac..5742441c 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}) => { + const fetchOldPost = ({store, postId, timeline = 'friends'}) => { return timelineFetcherService.fetchAndUpdate({ store, credentials, - timeline: 'own', + timeline, older: true, until: postId + 1 })