Merge pull request #3598 from vector-im/dbkr/clear_cache_button_electron

Make the clear cache button work on desktop
pull/3599/head
David Baker 2017-04-10 17:56:49 +01:00 committed by GitHub
commit 3fa8460ed7
2 changed files with 10 additions and 0 deletions

View File

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

View File

@ -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);
}
}