Inspired by: https://github.com/matrix-org/matrix-react-sdk/blob/
3c5c2bef6dbac51ce6e1864056523815ca4c38d9/src/components/views/elements/ErrorBoundary.tsx#L61-L68
Signed-off-by: morguldir <morguldir@protonmail.com>
Signed-off-by: morguldir <morguldir@protonmail.com>
<div className="settings-about__btns">
<Button onClick={() => window.open('https://github.com/ajbura/cinny')}>Source code</Button>
<Button onClick={() => window.open('https://cinny.in/#sponsor')}>Support</Button>
+ <Button onClick={() => settings.clearCacheAndReload()} variant="danger">Clear cache & reload</Button>
</div>
</div>
</div>
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]: () => {