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/3597pull/3598/head
parent
a1cb566761
commit
7f6d9a625d
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue