Merge branch 'statuses' into 'develop'

Restore hotkey navigataion for statuses

See merge request soapbox-pub/soapbox-fe!1731
This commit is contained in:
marcin mikołajczak 2022-08-12 21:49:10 +00:00
commit b76a3a9608
3 changed files with 6 additions and 2 deletions

View file

@ -24,11 +24,11 @@ const getStatus = makeGetStatus();
* Legacy Status wrapper accepting a status ID instead of the full entity. * Legacy Status wrapper accepting a status ID instead of the full entity.
* @deprecated Use the Status component directly. * @deprecated Use the Status component directly.
*/ */
const StatusContainer: React.FC<IStatusContainer> = ({ id }) => { const StatusContainer: React.FC<IStatusContainer> = ({ id, onMoveUp, onMoveDown }) => {
const status = useAppSelector(state => getStatus(state, { id })); const status = useAppSelector(state => getStatus(state, { id }));
if (status) { if (status) {
return <Status status={status} />; return <Status status={status} onMoveUp={onMoveUp} onMoveDown={onMoveDown} />;
} else { } else {
return null; return null;
} }

View file

@ -9,6 +9,8 @@ import { useAppSelector } from 'soapbox/hooks';
interface IThreadStatus { interface IThreadStatus {
id: string, id: string,
focusedStatusId: string, focusedStatusId: string,
onMoveUp: (id: string) => void,
onMoveDown: (id: string) => void,
} }
/** Status with reply-connector in threads. */ /** Status with reply-connector in threads. */

View file

@ -369,6 +369,8 @@ const Thread: React.FC<IThread> = (props) => {
key={id} key={id}
id={id} id={id}
focusedStatusId={status!.id} focusedStatusId={status!.id}
onMoveUp={handleMoveUp}
onMoveDown={handleMoveDown}
/> />
); );
}; };