From 7f66af71c8f0901882cd400ae182d3dc3c16becb Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Wed, 7 May 2025 15:27:20 +0800 Subject: [PATCH] fix: dialog drag handler layout, closes #1036 (#1076) --- apps/readest-app/src/components/Dialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/readest-app/src/components/Dialog.tsx b/apps/readest-app/src/components/Dialog.tsx index 81709cb7..64749723 100644 --- a/apps/readest-app/src/components/Dialog.tsx +++ b/apps/readest-app/src/components/Dialog.tsx @@ -43,7 +43,7 @@ const Dialog: React.FC = ({ const { appService } = useEnv(); const { systemUIVisible, statusBarHeight } = useThemeStore(); const { acquireBackKeyInterception, releaseBackKeyInterception } = useDeviceControlStore(); - const [isFullHeightInMobile, setIsFullHeightInMobile] = React.useState(!snapHeight); + const [isFullHeightInMobile, setIsFullHeightInMobile] = useState(!snapHeight); const [isRtl] = useState(() => getDirFromUILanguage() === 'rtl'); const iconSize22 = useResponsiveSize(22); const isMobile = window.innerWidth < 640; @@ -62,6 +62,7 @@ const Dialog: React.FC = ({ useEffect(() => { if (!isOpen) return; + setIsFullHeightInMobile(!snapHeight); window.addEventListener('keydown', handleKeyDown); if (appService?.isAndroidApp) { acquireBackKeyInterception();