Skip to content

Commit

Permalink
fix(opds): disable go to previous page keyboard shortcut when no prev…
Browse files Browse the repository at this point in the history
…ious url provided (Fixes #2554)
  • Loading branch information
panaC committed Oct 3, 2024
1 parent 87c7f6f commit 2cfd4e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/library/components/opds/PageNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class PageNavigation extends React.Component<IProps, undefined> {
this.registerAllKeyboardListeners();
}
}

public adjustElementPosition = () => {
const element = this.fixedElementRef.current;
const container = document.getElementById("opds_browserResults");
Expand Down Expand Up @@ -238,7 +238,7 @@ class PageNavigation extends React.Component<IProps, undefined> {
...this.props.location,
pathname: buildRoute(pageLinks.previous[0]),
}, this.props.location.state as IRouterLocationState);
} else if (pageLinks?.next[0]?.url) { // TODO RTL
} else if (pageLinks?.next[0]?.url && !isPrevious) { // TODO RTL
this.props.historyPush({
...this.props.location,
pathname: buildRoute(pageLinks.next[0]),
Expand Down

0 comments on commit 2cfd4e4

Please sign in to comment.