From f7cbf0f8d3b038cd27cb7a3fdd0ae4cd20b22a36 Mon Sep 17 00:00:00 2001 From: thoulee Date: Wed, 8 Jan 2025 21:41:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(Logcat):=20=E7=A7=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E5=BC=95=E7=94=A8=EF=BC=8C=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E5=88=97=E8=A1=A8=E5=8F=8D=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/logcat.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pages/logcat.tsx b/src/pages/logcat.tsx index fbf69ac..7c7a974 100644 --- a/src/pages/logcat.tsx +++ b/src/pages/logcat.tsx @@ -4,8 +4,7 @@ import React, { useEffect, useLayoutEffect, useMemo, - useRef, - useState, + useState } from 'react'; import { Animated, @@ -36,7 +35,6 @@ import { logFilePath, rootLog } from '../utils/logger'; export const Logcat = () => { const navigation = useNavigation(); - const logRef = useRef(null); const appTheme = useTheme(); const [isLoaded, setIsLoaded] = useState(false); @@ -152,8 +150,8 @@ export const Logcat = () => { return ( <> { } ListEmptyComponent={renderEmpty} persistentScrollbar - onLayout={() => { - logRef.current?.scrollToEnd(); - }} />