Make the clear cache button work on desktop

Implement reload in Platforms to support
https://github.com/matrix-org/matrix-react-sdk/pull/798

Fixes https://github.com/vector-im/riot-web/issues/3597
pull/3598/head
David Baker 2017-04-10 17:40:09 +01:00
parent a1cb566761
commit 7f6d9a625d
2 changed files with 10 additions and 0 deletions

View File

@ -139,4 +139,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
requestNotificationPermission() : Promise { requestNotificationPermission() : Promise {
return q('granted'); return q('granted');
} }
reload() {
electron.remote.getCurrentWebContents().reload();
}
} }

View File

@ -206,4 +206,10 @@ export default class WebPlatform extends VectorBasePlatform {
} }
return null; 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);
}
} }