From 935753f6b36f5d5f561a04a1a6239764fcde6c46 Mon Sep 17 00:00:00 2001 From: Junhui Chen Date: Thu, 31 Jul 2025 20:40:53 +0800 Subject: [PATCH] fix: remove lazy load --- app/(tabs)/memo-list.tsx | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/app/(tabs)/memo-list.tsx b/app/(tabs)/memo-list.tsx index 6c02fb9..b0fc7ab 100644 --- a/app/(tabs)/memo-list.tsx +++ b/app/(tabs)/memo-list.tsx @@ -6,11 +6,11 @@ import { FlatList, InteractionManager, PixelRatio, Platform, RefreshControl, Sty import { useSafeAreaInsets } from 'react-native-safe-area-context'; // 懒加载组件 -const ChatSvg = React.lazy(() => import('@/assets/icons/svg/chat.svg')); -const AskNavbar = React.lazy(() => import('@/components/layout/ask')); -const UploaderProgress = React.lazy(() => import('@/components/file-upload/upload-progress/uploader-progress')); -const SkeletonItem = React.lazy(() => import('@/components/memo/SkeletonItem')); -const ErrorBoundary = React.lazy(() => import('@/components/common/ErrorBoundary')); +import ChatSvg from '@/assets/icons/svg/chat.svg'; +import AskNavbar from '@/components/layout/ask'; +import UploaderProgress from '@/components/file-upload/upload-progress/uploader-progress'; +import SkeletonItem from '@/components/memo/SkeletonItem'; +import ErrorBoundary from '@/components/common/ErrorBoundary'; // 类型定义 import { useUploadManager } from '@/hooks/useUploadManager'; @@ -34,9 +34,7 @@ const preloadAssets = async () => { const SkeletonList = () => ( {Array(5).fill(0).map((_, index) => ( - - - + ))} ); @@ -145,13 +143,11 @@ const MemoList = () => { activeOpacity={0.7} > - }> - - + { {/* 上传进度 */} - - - + ), [insets.top]); @@ -226,9 +220,7 @@ const MemoList = () => { return ( - - - + ); } @@ -267,9 +259,6 @@ const MemoList = () => { /> {/* 底部导航栏 */} - - - );