From 5279160df954aa3c691b0112c73d6a4b487eefb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 26 Aug 2024 00:44:12 +0200 Subject: [PATCH] Fix pins display in account timeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/features/account-timeline/index.tsx | 2 +- src/reducers/timelines.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/account-timeline/index.tsx b/src/features/account-timeline/index.tsx index 309021107..1d0065035 100644 --- a/src/features/account-timeline/index.tsx +++ b/src/features/account-timeline/index.tsx @@ -32,7 +32,7 @@ const AccountTimeline: React.FC = ({ params, withReplies = fal const path = withReplies ? `${account?.id}:with_replies` : account?.id; const showPins = settings.account_timeline.shows.pinned && !withReplies; const statusIds = useAppSelector(state => getStatusIds(state, { type: `account:${path}`, prefix: 'account_timeline' })); - const featuredStatusIds = useAppSelector(state => getStatusIds(state, { type: `account:${account?.id}:pinned`, prefix: 'account_timeline' })); + const featuredStatusIds = useAppSelector(state => getStatusIds(state, { type: `account:${account?.id}:with_replies:pinned`, prefix: 'account_timeline' })); const isBlocked = useAppSelector(state => state.relationships.getIn([account?.id, 'blocked_by']) === true); const unavailable = isBlocked && !features.blockersVisible; diff --git a/src/reducers/timelines.ts b/src/reducers/timelines.ts index 50f6fd823..e4919fc8d 100644 --- a/src/reducers/timelines.ts +++ b/src/reducers/timelines.ts @@ -352,12 +352,12 @@ const timelines = (state: State = initialState, action: AnyAction) => { })); case PIN_SUCCESS: return state.updateIn( - [`account:${action.accountId}:pinned`, 'items'], + [`account:${action.accountId}:with_replies:pinned`, 'items'], ids => ImmutableOrderedSet([action.statusId]).union(ids as ImmutableOrderedSet), ); case UNPIN_SUCCESS: return state.updateIn( - [`account:${action.accountId}:pinned`, 'items'], + [`account:${action.accountId}:with_replies:pinned`, 'items'], ids => (ids as ImmutableOrderedSet).delete(action.statusId), ); default: