diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index c10f2f83c03..6e55b454cd6 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -139,4 +139,8 @@ export default class ElectronPlatform extends VectorBasePlatform { requestNotificationPermission() : Promise { return q('granted'); } + + reload() { + electron.remote.getCurrentWebContents().reload(); + } } diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index bf4175132ef..5dc55052972 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -206,4 +206,10 @@ export default class WebPlatform extends VectorBasePlatform { } return null; } + + reload() { + // forceReload=false since we don't really need new HTML/JS files + // we just need to restart the JS runtime. + window.location.reload(false); + } }