From 541521ae6f59d28c8b7765df370b95259f0b2657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 12 Aug 2022 23:21:44 +0200 Subject: [PATCH] Restore hotkey navigataion for statuses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/containers/status_container.tsx | 4 ++-- app/soapbox/features/status/components/thread-status.tsx | 2 ++ app/soapbox/features/status/index.tsx | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/soapbox/containers/status_container.tsx b/app/soapbox/containers/status_container.tsx index e5ac5014d..c6196638a 100644 --- a/app/soapbox/containers/status_container.tsx +++ b/app/soapbox/containers/status_container.tsx @@ -24,11 +24,11 @@ const getStatus = makeGetStatus(); * Legacy Status wrapper accepting a status ID instead of the full entity. * @deprecated Use the Status component directly. */ -const StatusContainer: React.FC = ({ id }) => { +const StatusContainer: React.FC = ({ id, onMoveUp, onMoveDown }) => { const status = useAppSelector(state => getStatus(state, { id })); if (status) { - return ; + return ; } else { return null; } diff --git a/app/soapbox/features/status/components/thread-status.tsx b/app/soapbox/features/status/components/thread-status.tsx index 6919e5e8d..f9117e903 100644 --- a/app/soapbox/features/status/components/thread-status.tsx +++ b/app/soapbox/features/status/components/thread-status.tsx @@ -9,6 +9,8 @@ import { useAppSelector } from 'soapbox/hooks'; interface IThreadStatus { id: string, focusedStatusId: string, + onMoveUp: (id: string) => void, + onMoveDown: (id: string) => void, } /** Status with reply-connector in threads. */ diff --git a/app/soapbox/features/status/index.tsx b/app/soapbox/features/status/index.tsx index baf6b61ae..add55ecf0 100644 --- a/app/soapbox/features/status/index.tsx +++ b/app/soapbox/features/status/index.tsx @@ -369,6 +369,8 @@ const Thread: React.FC = (props) => { key={id} id={id} focusedStatusId={status!.id} + onMoveUp={handleMoveUp} + onMoveDown={handleMoveDown} /> ); };