Post session info to service worker instead of asking from sw (#2605)
post session info to service worker instead of asking from sw on each request
This commit is contained in:
parent
206a927f30
commit
074c555294
5 changed files with 84 additions and 42 deletions
|
|
@ -2,6 +2,7 @@ import { createClient, MatrixClient, IndexedDBStore, IndexedDBCryptoStore } from
|
|||
|
||||
import { cryptoCallbacks } from './secretStorageKeys';
|
||||
import { clearNavToActivePathStore } from '../app/state/navToActivePath';
|
||||
import { pushSessionToSW } from '../sw-session';
|
||||
|
||||
type Session = {
|
||||
baseUrl: string;
|
||||
|
|
@ -53,6 +54,7 @@ export const clearCacheAndReload = async (mx: MatrixClient) => {
|
|||
};
|
||||
|
||||
export const logoutClient = async (mx: MatrixClient) => {
|
||||
pushSessionToSW();
|
||||
mx.stopClient();
|
||||
try {
|
||||
await mx.logout();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue