From 743fee27838c8eff9809fffe2115fd4519ca4f84 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 6 Aug 2024 18:44:19 +0300 Subject: [PATCH] electron: Fix alt+left, alt+right navigation Broken due to a change in Electron API: https://github.com/electron/electron/pull/41577/files --- src/public/app/components/entrypoints.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/app/components/entrypoints.js b/src/public/app/components/entrypoints.js index 6b281911f..6a375d5af 100644 --- a/src/public/app/components/entrypoints.js +++ b/src/public/app/components/entrypoints.js @@ -102,7 +102,7 @@ export default class Entrypoints extends Component { if (utils.isElectron()) { // standard JS version does not work completely correctly in electron const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents(); - const activeIndex = parseInt(webContents.getActiveIndex()); + const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex()); webContents.goToIndex(activeIndex - 1); } @@ -115,7 +115,7 @@ export default class Entrypoints extends Component { if (utils.isElectron()) { // standard JS version does not work completely correctly in electron const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents(); - const activeIndex = parseInt(webContents.getActiveIndex()); + const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex()); webContents.goToIndex(activeIndex + 1); }