Render progress bars only when visible
This commit is contained in:
@@ -50,6 +50,10 @@ const BaseMobileReaderProgressBar = ({
|
||||
return () => setIsMaximized(false);
|
||||
}, [isVisible]);
|
||||
|
||||
if (!isVisible) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<ReaderProgressBarDirectionWrapper>
|
||||
<Stack
|
||||
|
||||
@@ -52,6 +52,10 @@ 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 (
|
||||
|
||||
Reference in New Issue
Block a user