From 721772b08f74de8d09e1f4a9c8a85faed0ee0e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 17 May 2022 15:09:53 +0200 Subject: [PATCH] Fix hotkey navigation? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/scrollable_list.tsx | 3 +++ app/soapbox/components/status.tsx | 8 +++----- app/soapbox/components/status_list.js | Bin 7252 -> 7080 bytes .../components/conversations_list.js | Bin 2311 -> 2134 bytes app/soapbox/features/notifications/index.js | Bin 7382 -> 7272 bytes app/soapbox/features/status/index.tsx | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/soapbox/components/scrollable_list.tsx b/app/soapbox/components/scrollable_list.tsx index cc4b55867c..c7a93a8802 100644 --- a/app/soapbox/components/scrollable_list.tsx +++ b/app/soapbox/components/scrollable_list.tsx @@ -42,6 +42,7 @@ interface IScrollableList extends VirtuosoProps { onRefresh?: () => Promise, className?: string, itemClassName?: string, + id?: string, } /** Legacy ScrollableList with Virtuoso for backwards-compatibility */ @@ -58,6 +59,7 @@ const ScrollableList = React.forwardRef(({ onLoadMore, className, itemClassName, + id, hasMore, placeholderComponent: Placeholder, placeholderCount = 0, @@ -130,6 +132,7 @@ const ScrollableList = React.forwardRef(({ { } handleHotkeyMoveUp = (e?: KeyboardEvent): void => { - // FIXME: what's going on here? - // this.props.onMoveUp(this.props.status.id, e?.target?.getAttribute('data-featured')); + this.props.onMoveUp(this.props.status.id, this.props.featured); } handleHotkeyMoveDown = (e?: KeyboardEvent): void => { - // FIXME: what's going on here? - // this.props.onMoveDown(this.props.status.id, e?.target?.getAttribute('data-featured')); + this.props.onMoveDown(this.props.status.id, this.props.featured); } handleHotkeyToggleHidden = (): void => { @@ -601,7 +599,7 @@ class Status extends ImmutablePureComponent { return (
ROGCWA~*&d)0@QAo{6%}vcK zQLt4=$xki?G4AO}H delta 468 zcma)&u};G<5QZhjRBSBW4hdC`LL)IzQD6p%4a7=~du}WlJJ=UNRYiFKMqYvusn5U@ z&2Ultds=SsljN}19;)A)^|3COK1dAE2T#YcWsNhNxR%VxHe?(6}~WX1qM!? z04PJsBhL3w!g)i2IcyD LaI?Rj4D-Do6nva} diff --git a/app/soapbox/features/conversations/components/conversations_list.js b/app/soapbox/features/conversations/components/conversations_list.js index 95629045d3aaf85c6d35d4cd7ff29ae1bc3b50f6..6e2f751a963292a759e985f599703f49e6e3fdba 100644 GIT binary patch delta 286 zcmZn{x+bu}n0c}#bIs&E%rfyOG&NJ0jpI|NJ`B}EX&L1c1vOl{t2UM-X<}CKPi~z%qRIdO4 delta 510 zcma)(!AiqG5QZr&6>^f|Mes0!vKyFf8OZ<3xvV!y?&7PAP{^iZ%NHP zSU6x`sHCC1Qoto@7y-?=@uiyJx(q8S6nKx4tftia4-xA4%1%O3+8qa)cqs5h(yXso zpW->XM++_|_ypZOI8Hq9nF=El+zA|eL&wQp8v7|{;Ff66ZdVLUsFe`cY7S>m0QibA zgJgT#6nT>EaP#3plDgse=;n*CKDh!Qu_}X*+Z|T?(!UM66^u}D8~q&lbVhJmnw2Eb v{ngt@{{d*vqM$a diff --git a/app/soapbox/features/notifications/index.js b/app/soapbox/features/notifications/index.js index 69c18799e69c1d2704c2111c022694d994b31bc8..05fed79a78b66b373efb8c58f96fe44de79c2ede 100644 GIT binary patch delta 265 zcmca+`NCquR{`aq)HDTKg=7U=JB4a41t2KN$Sl^&%TGxK30nh&YA3%Fcrf{j;I_#V zg=CU6(Us{HCl}@Chde3QJB-7LgPK`JfhRX)VN#T21TCwIUkKf<>umw$)(o6{nT}{aw3xmbeWo E0Lal#W&i*H delta 432 zcmaE1am{kWSAog$f;ZW86iSLpQz!or+{Uh>kd~NJoH}`(kPN?$LSjy4dR}}VvVfD%3!kUJOMJ1WZIjL58B^kQ;X}Tqq1*sY;)tPxIsTB&^3Wl|s3VLbz$)&}K zNja$rn$}!glUEB%)@P8J;gXt2W=U@(ixDKL}2nPbg)UX)IiBPA)Oaq6O2Gj?&K*?GzATfC% QpVVei5jN({=HiB|0PvQLCjbBd diff --git a/app/soapbox/features/status/index.tsx b/app/soapbox/features/status/index.tsx index 33666c56b0..ac6b855393 100644 --- a/app/soapbox/features/status/index.tsx +++ b/app/soapbox/features/status/index.tsx @@ -715,7 +715,7 @@ class Status extends ImmutablePureComponent {