fix: 统一修复所有屏幕的安全区域问题
Some checks failed
Frontend CI / ota-android (push) Successful in 10m56s
Frontend CI / build-android-apk (push) Failing after 33m45s
Frontend CI / build-and-push-web (push) Failing after 46s

- 有 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:
lafay
2026-03-18 10:58:41 +08:00
parent e230e35ca2
commit 1ffbb63753
11 changed files with 15 additions and 15 deletions

View File

@@ -534,7 +534,7 @@ const GroupInfoScreen: React.FC = () => {
if (loading) {
return (
<SafeAreaView style={styles.container}>
<SafeAreaView style={styles.container} edges={['bottom']}>
<Loading />
</SafeAreaView>
);
@@ -542,7 +542,7 @@ const GroupInfoScreen: React.FC = () => {
if (!group) {
return (
<SafeAreaView style={styles.container}>
<SafeAreaView style={styles.container} edges={['bottom']}>
<View style={styles.errorContainer}>
<Text variant="body" color={colors.text.secondary}>

View File

@@ -931,7 +931,7 @@ export const MessageListScreen: React.FC = () => {
// 桌面端双栏布局
if (isWideScreen && !isSearchMode) {
return (
<SafeAreaView style={styles.container} edges={['top']}>
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
<View style={styles.desktopContainer}>
{/* 左侧会话列表 */}
<View style={[styles.sidebar, { width: sidebarWidth }]}>
@@ -966,7 +966,7 @@ export const MessageListScreen: React.FC = () => {
}
return (
<SafeAreaView style={styles.container} edges={['top']}>
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
{showNotifications ? (
// 显示系统通知页面,传入 onBack 回调
<NotificationsScreen onBack={() => setShowNotifications(false)} />

View File

@@ -372,7 +372,7 @@ export const NotificationsScreen: React.FC<{ onBack?: () => void }> = ({ onBack
// 如果还未hydrated显示加载占位符避免竞态条件导致的渲染问题
if (!isHydrated) {
return (
<SafeAreaView style={styles.container} edges={[]}>
<SafeAreaView style={styles.container} edges={['bottom']}>
<View style={styles.loadingContainer}>
<ActivityIndicator size="large" color={colors.primary.main} />
</View>
@@ -381,7 +381,7 @@ export const NotificationsScreen: React.FC<{ onBack?: () => void }> = ({ onBack
}
return (
<SafeAreaView style={styles.container} edges={[]}>
<SafeAreaView style={styles.container} edges={['bottom']}>
{isWideScreen ? (
<ResponsiveContainer maxWidth={containerMaxWidth}>
{/* 头部 - 大屏模式下隐藏返回按钮 */}

View File

@@ -307,7 +307,7 @@ const PrivateChatInfoScreen: React.FC = () => {
if (loading) {
return (
<SafeAreaView style={styles.container}>
<SafeAreaView style={styles.container} edges={['bottom']}>
<Loading />
</SafeAreaView>
);