Always register reader hotkeys
The hotkeys were never registered e.g. while loading or in case an error occurred
This commit is contained in:
@@ -281,6 +281,7 @@ const BaseReader = ({
|
|||||||
status: true,
|
status: true,
|
||||||
value: (
|
value: (
|
||||||
<Box sx={{ position: 'absolute' }}>
|
<Box sx={{ position: 'absolute' }}>
|
||||||
|
<ReaderHotkeys scrollElementRef={scrollElementRef} />
|
||||||
<ReaderOverlay isVisible={isOverlayVisible} />
|
<ReaderOverlay isVisible={isOverlayVisible} />
|
||||||
{!scrollElementRef.current && (
|
{!scrollElementRef.current && (
|
||||||
<Box
|
<Box
|
||||||
@@ -360,8 +361,6 @@ const BaseReader = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<ReaderHotkeys scrollElementRef={scrollElementRef} />
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
@@ -380,7 +379,6 @@ const BaseReader = ({
|
|||||||
<TapZoneLayout />
|
<TapZoneLayout />
|
||||||
<ReaderRGBAFilter />
|
<ReaderRGBAFilter />
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ export class ReaderService {
|
|||||||
isGlobal: boolean = false,
|
isGlobal: boolean = false,
|
||||||
profile?: ReadingMode,
|
profile?: ReadingMode,
|
||||||
): void {
|
): void {
|
||||||
if (!manga) {
|
if (!manga || manga.id === -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const key = getMetadataKey(setting, profile !== undefined ? [profile?.toString()] : undefined);
|
const key = getMetadataKey(setting, profile !== undefined ? [profile?.toString()] : undefined);
|
||||||
@@ -305,7 +305,7 @@ export class ReaderService {
|
|||||||
isGlobal: boolean = false,
|
isGlobal: boolean = false,
|
||||||
profile?: string,
|
profile?: string,
|
||||||
): void {
|
): void {
|
||||||
if (!manga) {
|
if (!manga || manga.id === -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user