Merge pull request #68 from vector-im/t3chguy/electron-forward-back

Add riot-desktop shortcuts for forward/back matching browsers&slack
This commit is contained in:
Michael Telatynski 2020-04-14 16:03:09 +01:00 committed by GitHub
commit c2ea23293e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -295,6 +295,16 @@ ipcMain.on('ipcCall', async function(ev, payload) {
case 'getConfig':
ret = vectorConfig;
break;
case 'navigateBack':
if (mainWindow.webContents.canGoBack()) {
mainWindow.webContents.goBack();
}
break;
case 'navigateForward':
if (mainWindow.webContents.canGoForward()) {
mainWindow.webContents.goForward();
}
break;
case 'setLanguage': {
// work around `setSpellCheckerLanguages` being case-sensitive by converting to expected case
const caseMap = {};