chore(deps): upgrade Expo SDK from 55 to 56
Migrate from @react-navigation/native to expo-router navigation hooks across all screens. Add polyfills module and apply LiveKit VideoView optional loading for Expo Go compatibility. Improve background sync to skip when user is not logged in. Enhance fetchUnreadCount to return typed totalUnread and systemUnread values.
This commit is contained in:
@@ -26,8 +26,8 @@ import {
|
||||
import { FlashList, ListRenderItem } from '@shopify/flash-list';
|
||||
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { useRouter } from 'expo-router';
|
||||
import { useIsFocused } from '@react-navigation/native';
|
||||
import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
|
||||
import { useIsFocused } from "expo-router/react-navigation";
|
||||
import { useBottomTabBarHeight } from "expo-router/js-tabs";
|
||||
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
||||
import {
|
||||
spacing,
|
||||
@@ -842,25 +842,25 @@ export const MessageListScreen: React.FC = () => {
|
||||
<View style={styles.chatArea}>
|
||||
{showNotifications ? (
|
||||
// 显示系统通知页面
|
||||
<NotificationsScreen onBack={stableCloseNotifications} />
|
||||
(<NotificationsScreen onBack={stableCloseNotifications} />)
|
||||
) : selectedConversation ? (
|
||||
// 显示选中会话的聊天内容
|
||||
<ChatScreen
|
||||
(<ChatScreen
|
||||
isEmbedded
|
||||
embeddedConversationId={String(selectedConversation.id)}
|
||||
embeddedIsGroupChat={selectedConversation.type === 'group'}
|
||||
embeddedGroupId={selectedConversation.group ? String(selectedConversation.group.id) : undefined}
|
||||
embeddedGroupName={selectedConversation.group?.name}
|
||||
onEmbeddedBack={stableClearSelectedConversation}
|
||||
/>
|
||||
/>)
|
||||
) : (
|
||||
// 默认占位符
|
||||
<View style={styles.chatPlaceholder}>
|
||||
(<View style={styles.chatPlaceholder}>
|
||||
<View style={styles.chatPlaceholderContent}>
|
||||
<MaterialCommunityIcons name="message-text-outline" size={64} color={colors.chat.iconMuted} />
|
||||
<Text style={styles.chatPlaceholderText}>选择一个会话开始聊天</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>)
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
@@ -873,7 +873,7 @@ export const MessageListScreen: React.FC = () => {
|
||||
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
|
||||
{showNotifications ? (
|
||||
// 显示系统通知页面,传入 onBack 回调
|
||||
<NotificationsScreen onBack={stableCloseNotifications} />
|
||||
(<NotificationsScreen onBack={stableCloseNotifications} />)
|
||||
) : isSearchMode ? (
|
||||
renderSearchMode()
|
||||
) : isWideScreen ? (
|
||||
|
||||
Reference in New Issue
Block a user