remove padding hack for android

This commit is contained in:
ppc
2026-02-08 15:47:05 +00:00
parent 56f6ad649b
commit 4092a2e373
2 changed files with 9 additions and 10 deletions
+8 -9
View File
@@ -217,17 +217,10 @@ export default function ServerCardIn({route, navigation}) {
)
}
const containerStyle = {
paddingTop: Platform.OS === 'android' ? insets.top : 0,
paddingHorizontal: 16,
paddingBottom: 80,
gap: 20
};
return (
<ScrollView contentInsetAdjustmentBehavior="automatic"
<ScrollView contentInsetAdjustmentBehavior="always"
refreshControl={<RefreshControl refreshing={serverRefreshing} onRefresh={performRefresh}/>}>
<View style={containerStyle}>
<View style={styles.container}>
<StatusAlert server={server} connectionEstablished={serverConnectionSuccess}/>
<View style={styles.section}>
<Text variant="titleLarge" style={styles.sectionTitle}>{server.gameId ? `Play ${getGameName(server.gameId)}` : "Selected Card"}</Text>
@@ -364,5 +357,11 @@ const styles = {
emptyPlaceholderView: {
marginVertical: 30,
gap: 15
},
container: {
paddingTop: Platform.select({android: 18, default: 0}),
paddingHorizontal: 16,
paddingBottom: 80,
gap: 20
}
};
+1 -1
View File
@@ -33,7 +33,7 @@ export default function ServerManagerStack({navigation}) {
headerRight: () => Platform.OS === 'android' ? null : <TouchableOpacity onPress={() => navigation.navigate('add-server')}><Plus color={theme.colors.primary}/></TouchableOpacity>
}}/>
<Stack.Screen name="server" options={{title: "Server", headerTransparent: true}} component={ServerCardIn}/>
<Stack.Screen name="server" options={{title: "Server", headerTransparent: Platform.select({default: false, ios: true})}} component={ServerCardIn}/>
</Stack.Group>
</Stack.Navigator>
);