mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-15 03:30:29 +03:00
Add clear cache btn in loading screen
This commit is contained in:
parent
4848bef0dd
commit
c1be57b205
6 changed files with 45 additions and 37 deletions
|
|
@ -1,16 +0,0 @@
|
|||
import initMatrix from '../initMatrix';
|
||||
|
||||
async function logout() {
|
||||
const mx = initMatrix.matrixClient;
|
||||
mx.stopClient();
|
||||
try {
|
||||
await mx.logout();
|
||||
} catch {
|
||||
// ignore if failed to logout
|
||||
}
|
||||
mx.clearStores();
|
||||
window.localStorage.clear();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
export default logout;
|
||||
Loading…
Add table
Add a link
Reference in a new issue