This commit is contained in:
Junhui Chen 2025-08-09 13:13:18 +08:00
parent 76f2e6ed48
commit 4c4360cefc

View File

@ -1,6 +1,6 @@
import { ThemedText } from "@/components/ThemedText";
import { Message } from "@/types/ask";
import { Dispatch, SetStateAction, useRef } from "react";
import { Dispatch, SetStateAction, useCallback, useRef } from "react";
import { useTranslation } from "react-i18next";
import { View } from 'react-native';
@ -16,7 +16,7 @@ export default function AskHello({ setUserMessages, setConversationId, setIsHell
//
const inFlightRef = useRef(false);
// const handleCase = useCallback(async (text: string) => {
const handleCase = useCallback(async (text: string) => {
// if (inFlightRef.current) return;
// inFlightRef.current = true;
// try {
@ -68,7 +68,7 @@ export default function AskHello({ setUserMessages, setConversationId, setIsHell
// } finally {
// inFlightRef.current = false;
// }
// }, [setConversationId, setIsHello, setUserMessages]);
}, [setConversationId, setIsHello, setUserMessages]);
return (
<View className="flex-1 bg-white w-full">