Skip to content

Commit 124e3bc

Browse files
committed
fix scrollbar
1 parent c48ff0b commit 124e3bc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/ExercisesGrid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { DataTable, Text, useTheme } from 'react-native-paper';
66
import { useAssets } from 'expo-asset';
77
import { Checkbox } from 'expo-checkbox';
88

9-
const rowHeight = Dimensions.get('window').width / 4.5; // Adjust the height as needed
9+
const rowHeight = Dimensions.get('window').width / 5.7; // Adjust the height as needed
1010
const screenHeight = Dimensions.get('window').height;
1111

1212
interface ExercisesGridComponentProps {
@@ -24,7 +24,7 @@ export default function ExercisesGridComponent({
2424

2525
const [page, setPage] = React.useState<number>(0);
2626
const theme = useTheme();
27-
const itemsPerPage = Math.floor(screenHeight / rowHeight) - 1;
27+
const itemsPerPage = Math.floor(screenHeight / rowHeight) - 2;
2828

2929
const from = page * itemsPerPage;
3030
const to = Math.min((page + 1) * itemsPerPage, items.length);

app/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,11 @@ export default function HomeScreen() {
120120
)}
121121
<ScrollView
122122
contentContainerStyle={styles.scrollContainer}
123+
scrollEnabled={false}
123124
refreshControl={
124-
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
125+
!modalVisible && !updateModalVisible ? (
126+
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
127+
) : undefined
125128
}
126129
>
127130
<HeaderBar onPlusPress={() => setModalVisible(true)} />

0 commit comments

Comments
 (0)