Add Clear cache and reload button (#793)
Inspired by: 3c5c2bef6d/src/components/views/elements/ErrorBoundary.tsx (L61-L68)
Signed-off-by: morguldir <morguldir@protonmail.com>
Signed-off-by: morguldir <morguldir@protonmail.com>
This commit is contained in:
@@ -147,6 +147,14 @@ class Settings extends EventEmitter {
|
||||
return settings.isNotificationSounds;
|
||||
}
|
||||
|
||||
clearCacheAndReload() {
|
||||
const mx = initMatrix.matrixClient;
|
||||
mx.stopClient()
|
||||
mx.store.deleteAllData().then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
setter(action) {
|
||||
const actions = {
|
||||
[cons.actions.settings.TOGGLE_SYSTEM_THEME]: () => {
|
||||
|
||||
Reference in New Issue
Block a user