pl-fe: improve virtual list positioning, i hate my life btw
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
@ -120,7 +120,13 @@ const ScrollableList = React.forwardRef<Virtualizer<any, any>, IScrollableList>(
|
||||
useEffect(() => {
|
||||
if (showLoading) return;
|
||||
|
||||
if (typeof initialIndex === 'number') virtualizer.scrollToIndex(initialIndex);
|
||||
if (typeof initialIndex === 'number') {
|
||||
const targetIndex = (initialIndex === 0) ? initialIndex : initialIndex + 1;
|
||||
virtualizer.scrollToIndex(targetIndex);
|
||||
setTimeout(() => {
|
||||
virtualizer.scrollToIndex(targetIndex);
|
||||
}, 1);
|
||||
}
|
||||
}, [showLoading, initialIndex]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -104,7 +104,7 @@ const StatusDetails: React.FC<IStatusDetails> = (props) => {
|
||||
<Stack space={4}>
|
||||
<Column label={intl.formatMessage(titleMessage())}>
|
||||
<PullToRefresh onRefresh={handleRefresh}>
|
||||
<Thread status={status} />
|
||||
<Thread key={status.id} status={status} />
|
||||
</PullToRefresh>
|
||||
</Column>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user