diff --git a/apps/readest-app/src/app/reader/components/FooterBar.tsx b/apps/readest-app/src/app/reader/components/FooterBar.tsx index d14ac968..d2f93a5d 100644 --- a/apps/readest-app/src/app/reader/components/FooterBar.tsx +++ b/apps/readest-app/src/app/reader/components/FooterBar.tsx @@ -67,64 +67,73 @@ const FooterBar: React.FC = ({ } }; + const isVisible = hoveredBookKey === bookKey; const progressInfo = bookFormat === 'PDF' ? section : pageinfo; const progressValid = !!progressInfo; const progressFraction = progressValid ? (progressInfo!.current + 1) / progressInfo!.total : 0; + return ( -
setHoveredBookKey(bookKey)} - onMouseLeave={() => setHoveredBookKey('')} - > -
+ <> +
setHoveredBookKey(bookKey)} + onTouchStart={() => setHoveredBookKey(bookKey)} + /> +
setHoveredBookKey('')} + aria-hidden={!isVisible} + > +
+
-
-
+ ); }; diff --git a/apps/readest-app/src/app/reader/components/sidebar/BooknoteItem.tsx b/apps/readest-app/src/app/reader/components/sidebar/BooknoteItem.tsx index 0030788d..2df1fa96 100644 --- a/apps/readest-app/src/app/reader/components/sidebar/BooknoteItem.tsx +++ b/apps/readest-app/src/app/reader/components/sidebar/BooknoteItem.tsx @@ -90,7 +90,7 @@ const BooknoteItem: React.FC = ({ bookKey, item }) => { {item.note && (
)} -
+
{ const [isUpdated, setIsUpdated] = React.useState(false); const handleCheckUpdate = async () => { - const update = await checkForAppUpdates(_); + const update = await checkForAppUpdates(_, false); if (!update) { setIsUpdated(true); } diff --git a/apps/readest-app/src/helpers/updater.ts b/apps/readest-app/src/helpers/updater.ts index 81ff3513..4b51632b 100644 --- a/apps/readest-app/src/helpers/updater.ts +++ b/apps/readest-app/src/helpers/updater.ts @@ -6,10 +6,11 @@ import { TranslationFunc } from '@/hooks/useTranslation'; const LAST_CHECK_KEY = 'lastAppUpdateCheck'; -export const checkForAppUpdates = async (_: TranslationFunc) => { +export const checkForAppUpdates = async (_: TranslationFunc, autoCheck = true) => { const lastCheck = localStorage.getItem(LAST_CHECK_KEY); const now = Date.now(); - if (lastCheck && now - parseInt(lastCheck, 10) < CHECK_UPDATE_INTERVAL_SEC * 1000) return; + if (autoCheck && lastCheck && now - parseInt(lastCheck, 10) < CHECK_UPDATE_INTERVAL_SEC * 1000) + return; localStorage.setItem(LAST_CHECK_KEY, now.toString()); console.log('Checking for updates');