You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-18 09:22:18 +03:00
Use options object
This commit is contained in:
@ -99,7 +99,9 @@ export async function loadSession(opts) {
|
|||||||
guest: true,
|
guest: true,
|
||||||
}, true).then(() => true);
|
}, true).then(() => true);
|
||||||
}
|
}
|
||||||
const success = await _restoreFromLocalStorage(Boolean(opts.ignoreGuest));
|
const success = await _restoreFromLocalStorage({
|
||||||
|
ignoreGuest: Boolean(opts.ignoreGuest),
|
||||||
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -275,7 +277,9 @@ export function getLocalStorageSessionVars() {
|
|||||||
// The plan is to gradually move the localStorage access done here into
|
// The plan is to gradually move the localStorage access done here into
|
||||||
// SessionStore to avoid bugs where the view becomes out-of-sync with
|
// SessionStore to avoid bugs where the view becomes out-of-sync with
|
||||||
// localStorage (e.g. isGuest etc.)
|
// localStorage (e.g. isGuest etc.)
|
||||||
async function _restoreFromLocalStorage(ignoreGuest) {
|
async function _restoreFromLocalStorage(opts) {
|
||||||
|
const ignoreGuest = opts.ignoreGuest;
|
||||||
|
|
||||||
if (!localStorage) {
|
if (!localStorage) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user