Disable rageshake persistence if no logs would be submitted
This also delays the persistence until later in the app startup - this is fine for the reasons listed on the partner PR: https://github.com/matrix-org/matrix-react-sdk/pull/5767 Fixes https://github.com/vector-im/element-web/issues/16694
This commit is contained in:
parent
ba28c6d57a
commit
a76c4ae943
3 changed files with 24 additions and 2 deletions
|
@ -92,6 +92,7 @@ async function start() {
|
|||
// load init.ts async so that its code is not executed immediately and we can catch any exceptions
|
||||
const {
|
||||
rageshakePromise,
|
||||
setupLogStorage,
|
||||
preparePlatform,
|
||||
loadOlm,
|
||||
loadConfig,
|
||||
|
@ -138,6 +139,9 @@ async function start() {
|
|||
await settled(loadConfigPromise); // wait for it to settle
|
||||
// keep initialising so that we can show any possible error with as many features (theme, i18n) as possible
|
||||
|
||||
// now that the config is ready, try to persist logs
|
||||
const persistLogsPromise = setupLogStorage();
|
||||
|
||||
// Load language after loading config.json so that settingsDefaults.language can be applied
|
||||
const loadLanguagePromise = loadLanguage();
|
||||
// as quickly as we possibly can, set a default theme...
|
||||
|
@ -197,6 +201,11 @@ async function start() {
|
|||
await loadThemePromise;
|
||||
await loadLanguagePromise;
|
||||
|
||||
// We don't care if the log persistence made it through successfully, but we do want to
|
||||
// make sure it had a chance to load before we move on. It's prepared much higher up in
|
||||
// the process, making this the first time we check that it did something.
|
||||
await settled(persistLogsPromise);
|
||||
|
||||
// Finally, load the app. All of the other react-sdk imports are in this file which causes the skinner to
|
||||
// run on the components.
|
||||
await loadApp(fragparts.params);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue