Always register reader hotkeys

The hotkeys were never registered e.g. while loading or in case an error occurred
This commit is contained in:
schroda
2024-12-24 17:21:25 +01:00
parent 94b0e25df2
commit 72809309e1
2 changed files with 21 additions and 23 deletions

View File

@@ -281,6 +281,7 @@ const BaseReader = ({
status: true,
value: (
<Box sx={{ position: 'absolute' }}>
<ReaderHotkeys scrollElementRef={scrollElementRef} />
<ReaderOverlay isVisible={isOverlayVisible} />
{!scrollElementRef.current && (
<Box
@@ -360,8 +361,6 @@ const BaseReader = ({
}
return (
<>
<ReaderHotkeys scrollElementRef={scrollElementRef} />
<Box
sx={{
position: 'relative',
@@ -380,7 +379,6 @@ const BaseReader = ({
<TapZoneLayout />
<ReaderRGBAFilter />
</Box>
</>
);
};

View File

@@ -241,7 +241,7 @@ export class ReaderService {
isGlobal: boolean = false,
profile?: ReadingMode,
): void {
if (!manga) {
if (!manga || manga.id === -1) {
return;
}
const key = getMetadataKey(setting, profile !== undefined ? [profile?.toString()] : undefined);
@@ -305,7 +305,7 @@ export class ReaderService {
isGlobal: boolean = false,
profile?: string,
): void {
if (!manga) {
if (!manga || manga.id === -1) {
return;
}