Delay "reading mode" and "tap zone" preview until reader is ready
This commit is contained in:
@@ -287,8 +287,7 @@ const BaseReader = ({
|
|||||||
const previousTapZoneInvertMode = useRef<IReaderSettingsWithDefaultFlag['tapZoneInvertMode']>();
|
const previousTapZoneInvertMode = useRef<IReaderSettingsWithDefaultFlag['tapZoneInvertMode']>();
|
||||||
const isInitialPreview = useRef(true);
|
const isInitialPreview = useRef(true);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const mangaFromResponse = mangaResponse.data?.manga;
|
if (isLoading || error) {
|
||||||
if (!mangaFromResponse || defaultSettingsResponse.loading || defaultSettingsResponse.error) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,6 +313,8 @@ const BaseReader = ({
|
|||||||
|
|
||||||
isInitialPreview.current = false;
|
isInitialPreview.current = false;
|
||||||
}, [
|
}, [
|
||||||
|
isLoading,
|
||||||
|
error,
|
||||||
readingMode.value,
|
readingMode.value,
|
||||||
readingMode.isDefault,
|
readingMode.isDefault,
|
||||||
tapZoneLayout.value,
|
tapZoneLayout.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user