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
|
@ -33,7 +33,7 @@ import PlatformPeg from "matrix-react-sdk/src/PlatformPeg";
|
|||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
import {setTheme} from "matrix-react-sdk/src/theme";
|
||||
|
||||
import { initRageshake } from "./rageshakesetup";
|
||||
import {initRageshake, initRageshakeStore} from "./rageshakesetup";
|
||||
|
||||
|
||||
export const rageshakePromise = initRageshake();
|
||||
|
@ -51,6 +51,14 @@ export function preparePlatform() {
|
|||
}
|
||||
}
|
||||
|
||||
export function setupLogStorage() {
|
||||
if (SdkConfig.get().bug_report_endpoint_url) {
|
||||
return initRageshakeStore();
|
||||
}
|
||||
console.warn("No bug report endpoint set - logs will not be persisted");
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
export async function loadConfig() {
|
||||
// XXX: We call this twice, once here and once in MatrixChat as a prop. We call it here to ensure
|
||||
// granular settings are loaded correctly and to avoid duplicating the override logic for the theme.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue