Skip to content

Commit e00ecfa

Browse files
committed
fix: list
1 parent af0d1b8 commit e00ecfa

File tree

1 file changed

+2
-16
lines changed
  • app/views/RoomView/List/components

1 file changed

+2
-16
lines changed

app/views/RoomView/List/components/List.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import React, { useEffect, useMemo, useState } from 'react';
2-
import { NativeScrollEvent, NativeSyntheticEvent, StyleSheet, View } from 'react-native';
2+
import { type NativeScrollEvent, type NativeSyntheticEvent, StyleSheet, View } from 'react-native';
33
import { FlashList } from '@shopify/flash-list';
44

5-
import { IListProps } from '../definitions';
6-
import { isIOS } from '../../../../lib/methods/helpers';
7-
import scrollPersistTaps from '../../../../lib/methods/helpers/scrollPersistTaps';
8-
import NavBottomFAB from './NavBottomFAB';
95
import { type IListProps } from '../definitions';
6+
import NavBottomFAB from './NavBottomFAB';
107
import { SCROLL_LIMIT } from '../constants';
118
import { useRoomContext } from '../../context';
12-
import { SCROLL_LIMIT } from '../constants';
13-
import NavBottomFAB from './NavBottomFAB';
149

1510
const styles = StyleSheet.create({
1611
list: {
@@ -47,18 +42,9 @@ const List = ({ listRef, jumpToBottom, ...props }: IListProps) => {
4742
}
4843
};
4944

50-
useEffect(() => {
51-
if (!userScrolled) {
52-
setTimeout(() => {
53-
listRef?.current.scrollToEnd();
54-
}, 200);
55-
}
56-
}, [props.data?.length]);
57-
5845
return (
5946
<View style={styles.list}>
6047
<FlashList
61-
onMomentumScrollBegin={() => setUserScrolled(true)}
6248
ref={listRef}
6349
accessibilityElementsHidden={isAutocompleteVisible}
6450
importantForAccessibility={isAutocompleteVisible ? 'no-hide-descendants' : 'yes'}

0 commit comments

Comments
 (0)