fix: 移除hello
This commit is contained in:
parent
d0ce370509
commit
81c1bf7c88
@ -1,4 +1,5 @@
|
||||
import { HapticTab } from '@/components/HapticTab';
|
||||
import AskNavbar from '@/components/layout/ask';
|
||||
import { TabBarIcon } from '@/components/navigation/TabBarIcon';
|
||||
import { requestNotificationPermission } from '@/components/owner/utils';
|
||||
import TabBarBackground from '@/components/ui/TabBarBackground';
|
||||
@ -7,13 +8,13 @@ import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
import { prefetchChats } from '@/lib/prefetch';
|
||||
import { fetchApi } from '@/lib/server-api-util';
|
||||
import { getWebSocketManager, WebSocketStatus } from '@/lib/websocket-util';
|
||||
import { TransitionPresets } from '@react-navigation/bottom-tabs';
|
||||
import * as Notifications from 'expo-notifications';
|
||||
import { Tabs } from 'expo-router';
|
||||
import * as SecureStore from 'expo-secure-store';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Platform } from 'react-native';
|
||||
|
||||
interface PollingData {
|
||||
title: string;
|
||||
id: string;
|
||||
@ -258,35 +259,35 @@ export default function TabLayout() {
|
||||
{/* ask页面 */}
|
||||
<Tabs.Screen
|
||||
name="ask"
|
||||
// options={{
|
||||
// title: 'ask',
|
||||
// tabBarButton: () => null, // 隐藏底部标签栏
|
||||
// headerShown: false, // 隐藏导航栏
|
||||
// tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||
// ...TransitionPresets.ShiftTransition,
|
||||
// }}
|
||||
options={{
|
||||
title: 'ask',
|
||||
tabBarButton: () => null, // 隐藏底部标签栏
|
||||
headerShown: false, // 隐藏导航栏
|
||||
tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||
...TransitionPresets.ShiftTransition,
|
||||
}}
|
||||
/>
|
||||
{/* memo list */}
|
||||
<Tabs.Screen
|
||||
< Tabs.Screen
|
||||
name="memo-list"
|
||||
// options={{
|
||||
// title: 'memo-list',
|
||||
// tabBarButton: () => null, // 隐藏底部标签栏
|
||||
// headerShown: false, // 隐藏导航栏
|
||||
// tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||
// ...TransitionPresets.ShiftTransition,
|
||||
// }}
|
||||
options={{
|
||||
title: 'memo-list',
|
||||
tabBarButton: () => null, // 隐藏底部标签栏
|
||||
headerShown: false, // 隐藏导航栏
|
||||
tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||
...TransitionPresets.ShiftTransition,
|
||||
}}
|
||||
/>
|
||||
{/* owner */}
|
||||
<Tabs.Screen
|
||||
< Tabs.Screen
|
||||
name="owner"
|
||||
// options={{
|
||||
// title: 'owner',
|
||||
// tabBarButton: () => null, // 隐藏底部标签栏
|
||||
// headerShown: false, // 隐藏导航栏
|
||||
// tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||
// ...TransitionPresets.ShiftTransition,
|
||||
// }}
|
||||
options={{
|
||||
title: 'owner',
|
||||
tabBarButton: () => null, // 隐藏底部标签栏
|
||||
headerShown: false, // 隐藏导航栏
|
||||
tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||
...TransitionPresets.ShiftTransition,
|
||||
}}
|
||||
/>
|
||||
{/* 排行榜 */}
|
||||
<Tabs.Screen
|
||||
@ -366,7 +367,7 @@ export default function TabLayout() {
|
||||
}}
|
||||
/>
|
||||
</Tabs >
|
||||
{/* <AskNavbar wsStatus={wsStatus} /> */}
|
||||
<AskNavbar wsStatus={wsStatus} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import ReturnArrow from "@/assets/icons/svg/returnArrow.svg";
|
||||
import Chat from "@/components/ask/chat";
|
||||
import AskHello from "@/components/ask/hello";
|
||||
import SendMessage from "@/components/ask/send";
|
||||
import { ThemedText } from "@/components/ThemedText";
|
||||
import { useWebSocketStreamHandler } from "@/hooks/useWebSocketStreamHandler";
|
||||
@ -188,6 +187,7 @@ export default function AskScreen() {
|
||||
signal: abortControllerRef.current.signal
|
||||
}).then((res) => {
|
||||
if (isMountedRef.current) {
|
||||
console.log("isMountedRef.current", isMountedRef.current)
|
||||
setUserMessages(res);
|
||||
}
|
||||
}).catch((error) => {
|
||||
@ -218,7 +218,7 @@ export default function AskScreen() {
|
||||
}
|
||||
}, [sessionId])
|
||||
);
|
||||
|
||||
|
||||
// 组件卸载时的清理
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
@ -253,11 +253,11 @@ export default function AskScreen() {
|
||||
|
||||
<View style={styles.contentContainer}>
|
||||
{/* 欢迎页面 */}
|
||||
<Animated.View
|
||||
{/* <Animated.View
|
||||
style={[styles.absoluteView, welcomeStyle, { zIndex: 1 }]}
|
||||
>
|
||||
<AskHello setUserMessages={setUserMessages} setConversationId={setConversationId} setIsHello={setIsHello} />
|
||||
</Animated.View>
|
||||
<AskHello setUserMessages={setUserMessages} setConversationId={setConversationId} setIsHello={setIsHello} />
|
||||
</Animated.View> */}
|
||||
|
||||
{/* 聊天页面 */}
|
||||
<Animated.View
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user