diff --git a/apps/readest-app/package.json b/apps/readest-app/package.json index 231ee18c..4879d929 100644 --- a/apps/readest-app/package.json +++ b/apps/readest-app/package.json @@ -1,6 +1,6 @@ { "name": "@readest/readest-app", - "version": "0.9.53", + "version": "0.9.55", "private": true, "scripts": { "dev": "dotenv -e .env.tauri -- next dev", diff --git a/apps/readest-app/release-notes.json b/apps/readest-app/release-notes.json index 4666a487..30c54950 100644 --- a/apps/readest-app/release-notes.json +++ b/apps/readest-app/release-notes.json @@ -1,5 +1,14 @@ { "releases": { + "0.9.55": { + "date": "2025-06-07", + "notes": [ + "Sync: Notes deleted on other devices now correctly sync across all platforms", + "Layout: Now text justification can be unset in the layout settings", + "Translation: Added notification when daily translation quota is exceeded", + "Performance: Reduced unnecessary animations on Android to improve efficiency" + ] + }, "0.9.53": { "date": "2025-06-05", "notes": [ diff --git a/apps/readest-app/src/components/Dialog.tsx b/apps/readest-app/src/components/Dialog.tsx index 942b6934..f982d76b 100644 --- a/apps/readest-app/src/components/Dialog.tsx +++ b/apps/readest-app/src/components/Dialog.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import React, { ReactNode, useEffect, useState } from 'react'; +import React, { ReactNode, useEffect, useRef, useState } from 'react'; import { MdArrowBackIosNew, MdArrowForwardIos } from 'react-icons/md'; import { useEnv } from '@/context/EnvContext'; import { useDrag } from '@/hooks/useDrag'; @@ -45,6 +45,7 @@ const Dialog: React.FC = ({ const { acquireBackKeyInterception, releaseBackKeyInterception } = useDeviceControlStore(); const [isFullHeightInMobile, setIsFullHeightInMobile] = useState(!snapHeight); const [isRtl] = useState(() => getDirFromUILanguage() === 'rtl'); + const dialogRef = useRef(null); const iconSize22 = useResponsiveSize(22); const isMobile = window.innerWidth < 640; @@ -79,10 +80,10 @@ const Dialog: React.FC = ({ }, [isOpen]); const handleDragMove = (data: { clientY: number; deltaY: number }) => { - if (!isMobile) return; + if (!isMobile || !dialogRef.current) return; - const modal = document.querySelector('.modal-box') as HTMLElement; - const overlay = document.querySelector('.overlay') as HTMLElement; + const modal = dialogRef.current.querySelector('.modal-box') as HTMLElement; + const overlay = dialogRef.current.querySelector('.overlay') as HTMLElement; const heightFraction = data.clientY / window.innerHeight; const newTop = Math.max(0.0, Math.min(1, heightFraction)); @@ -98,8 +99,9 @@ const Dialog: React.FC = ({ }; const handleDragEnd = (data: { velocity: number; clientY: number }) => { - const modal = document.querySelector('.modal-box') as HTMLElement; - const overlay = document.querySelector('.overlay') as HTMLElement; + if (!isMobile || !dialogRef.current) return; + const modal = dialogRef.current.querySelector('.modal-box') as HTMLElement; + const overlay = dialogRef.current.querySelector('.overlay') as HTMLElement; if (!modal || !overlay) return; const snapUpper = snapHeight ? 1 - snapHeight - SNAP_THRESHOLD : 0.5; @@ -148,6 +150,7 @@ const Dialog: React.FC = ({ return ( { } }; - if (!isMounted || !update) { + if (!isMounted || !newVersion) { return null; }