diff --git a/src/frontend/screens/ObservationsList/ObservationListItem.tsx b/src/frontend/screens/ObservationsList/ObservationListItem.tsx index 9b0e83f5dd..865e01e8f7 100644 --- a/src/frontend/screens/ObservationsList/ObservationListItem.tsx +++ b/src/frontend/screens/ObservationsList/ObservationListItem.tsx @@ -43,7 +43,7 @@ function ObservationListItemNotMemoized({ onPress(observation.docId)} testID={testID} - style={{flex: 1, height: 80}}> + style={{flex: 1, minHeight: 80}}> @@ -136,7 +136,7 @@ const styles = StyleSheet.create({ width: '100%', paddingHorizontal: 20, flex: 1, - height: 80, + minHeight: 80, }, text: { flex: 1, diff --git a/src/frontend/screens/ObservationsList/index.tsx b/src/frontend/screens/ObservationsList/index.tsx index 39119ae7f6..aeccac3353 100644 --- a/src/frontend/screens/ObservationsList/index.tsx +++ b/src/frontend/screens/ObservationsList/index.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {View, FlatList, Dimensions, StyleSheet} from 'react-native'; +import {View, FlatList, StyleSheet} from 'react-native'; import {Observation, Track} from '@comapeo/schema'; import {MessageDescriptor, defineMessages} from 'react-intl'; import {useFocusEffect} from '@react-navigation/native'; @@ -36,17 +36,8 @@ const m = defineMessages({ }, }); -const OBSERVATION_CELL_HEIGHT = 80; const ONE_HOUR = 60 * 60 * 1000; -function getItemLayout(_data: unknown, index: number) { - return { - length: OBSERVATION_CELL_HEIGHT, - offset: OBSERVATION_CELL_HEIGHT * index, - index, - }; -} - const keyExtractor = (item: Observation | Track) => item.docId; export const ObservationsList: React.FC< @@ -80,10 +71,6 @@ export const ObservationsList: React.FC< lastInteractionRef.current = mode === 'mine' ? Date.now() : null; } - const rowsPerWindow = Math.ceil( - (Dimensions.get('window').height - 65) / OBSERVATION_CELL_HEIGHT, - ); - const filteredData = React.useMemo(() => { const allData = [...observations, ...tracks]; @@ -123,8 +110,6 @@ export const ObservationsList: React.FC< )} {/* re: https://github.com/digidem/comapeo-mobile/issues/586 */}