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.
* @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 }));
if (status) {
return <Status status={status} />;
return <Status status={status} onMoveUp={onMoveUp} onMoveDown={onMoveDown} />;
} else {
return null;
}

View file

@ -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. */

View file

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