mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-30 18:57:54 +03:00
remove padding hack for android
This commit is contained in:
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user