fix: 统一修复所有屏幕的安全区域问题
- 有 header 的屏幕使用 edges={['bottom']}(React Navigation 自动处理顶部)
- 没有 header 的屏幕使用 edges={['top', 'bottom']}(需要自己处理顶部)
- 修复了以下屏幕:
- HomeScreen: edges={['bottom']} → ['top', 'bottom']
- MessageListScreen: edges={['top']} → ['top', 'bottom']
- ScheduleScreen: edges={['top']} → ['top', 'bottom']
- ProfileScreen: edges={['top', 'bottom']} ✓ 已正确
- PostDetailScreen: 空状态添加 edges={['bottom']}
- UserScreen: 空状态添加 edges={['bottom']}
- NotificationsScreen: edges={[]} → ['bottom']
- SearchScreen: edges={['left', 'right']} → ['bottom']
- BlockedUsersScreen: 加载状态添加 edges={['bottom']}
- GroupInfoScreen: edges={['bottom']} ✓ 已正确
- PrivateChatInfoScreen: 加载状态添加 edges={['bottom']}
This commit is contained in:
@@ -643,7 +643,7 @@ export const HomeScreen: React.FC = () => {
|
||||
// 搜索页面内嵌模式
|
||||
if (showSearch) {
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
|
||||
<StatusBar barStyle="dark-content" backgroundColor={colors.background.paper} />
|
||||
<SearchScreen
|
||||
onBack={() => setShowSearch(false)}
|
||||
@@ -654,7 +654,7 @@ export const HomeScreen: React.FC = () => {
|
||||
|
||||
// 正常首页内容
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
|
||||
<StatusBar barStyle="dark-content" backgroundColor={colors.background.paper} />
|
||||
|
||||
{/* 顶部Header */}
|
||||
|
||||
@@ -1406,7 +1406,7 @@ export const PostDetailScreen: React.FC = () => {
|
||||
|
||||
if (!post) {
|
||||
return (
|
||||
<SafeAreaView style={styles.container}>
|
||||
<SafeAreaView style={styles.container} edges={['bottom']}>
|
||||
<EmptyState
|
||||
title="帖子不存在"
|
||||
description="该帖子可能已被删除"
|
||||
|
||||
@@ -407,7 +407,7 @@ export const SearchScreen: React.FC<SearchScreenProps> = ({ onBack, navigation:
|
||||
};
|
||||
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['left', 'right']}>
|
||||
<SafeAreaView style={styles.container} edges={['bottom']}>
|
||||
{/* 搜索输入框 */}
|
||||
<View
|
||||
style={[
|
||||
|
||||
Reference in New Issue
Block a user