Fix opening hidden progress bar

Regression 7e9684b7d3
This commit is contained in:
schroda
2024-12-22 21:52:48 +01:00
parent 4cc38a96db
commit 9ea30ee850

View File

@@ -51,10 +51,6 @@ const BaseStandardReaderProgressBar = ({
const isHidden = progressBarType === ProgressBarType.HIDDEN; const isHidden = progressBarType === ProgressBarType.HIDDEN;
const isMinimized = !isMaximized && !isDragging; 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 // 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 // depending on which combination of theme direction and reading direction is currently active
return ( return (
@@ -62,7 +58,12 @@ const BaseStandardReaderProgressBar = ({
<ReaderProgressBar <ReaderProgressBar
{...pagesState} {...pagesState}
progressBarPosition={progressBarPosition} progressBarPosition={progressBarPosition}
createProgressBarSlot={(page, pageLoadStates, pagesIndex) => ( createProgressBarSlot={(page, pageLoadStates, pagesIndex) => {
if (isHidden && isMinimized) {
return null;
}
return (
<ReaderProgressBarSlotDesktop <ReaderProgressBarSlotDesktop
pageName={page.name} pageName={page.name}
pageUrl={page.primary.url} pageUrl={page.primary.url}
@@ -79,7 +80,8 @@ const BaseStandardReaderProgressBar = ({
isLeadingPage={pagesIndex < currentPagesIndex} isLeadingPage={pagesIndex < currentPagesIndex}
isDragging={isDragging} isDragging={isDragging}
/> />
)} );
}}
slotProps={{ slotProps={{
container: { container: {
sx: { sx: {