From 9ea30ee850a47cec4cce01097f5f9a774e5ce213 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 22 Dec 2024 21:52:48 +0100 Subject: [PATCH] Fix opening hidden progress bar Regression 7e9684b7d30592e5c87f2385176e067d70feb440 --- .../variants/StandardReaderProgressBar.tsx | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/modules/reader/components/overlay/progress-bar/variants/StandardReaderProgressBar.tsx b/src/modules/reader/components/overlay/progress-bar/variants/StandardReaderProgressBar.tsx index c8a0f8cb..99a333f0 100644 --- a/src/modules/reader/components/overlay/progress-bar/variants/StandardReaderProgressBar.tsx +++ b/src/modules/reader/components/overlay/progress-bar/variants/StandardReaderProgressBar.tsx @@ -51,10 +51,6 @@ const BaseStandardReaderProgressBar = ({ const isHidden = progressBarType === ProgressBarType.HIDDEN; const isMinimized = !isMaximized && !isDragging; - if (isHidden) { - return null; - } - // the progress bar uses the reading direction to set the themes direction, thus, stuff has to be adjusted to still be correctly positioned // depending on which combination of theme direction and reading direction is currently active return ( @@ -62,24 +58,30 @@ const BaseStandardReaderProgressBar = ({ ( - - )} + createProgressBarSlot={(page, pageLoadStates, pagesIndex) => { + if (isHidden && isMinimized) { + return null; + } + + return ( + + ); + }} slotProps={{ container: { sx: {