Update SdkConfig usage to use new translation layer + update config.md docs (#21429)
* Update SdkConfig usage to use new translation layer * Appease the linter * WIP refactor of config documentation * Finish re-writing config.md * Update surrounding documentation * Apply suggestions from code review Co-authored-by: Germain <germains@element.io> * Textual updates Co-authored-by: Germain <germains@element.io>
This commit is contained in:
parent
071a5410b8
commit
1384783a77
14 changed files with 526 additions and 249 deletions
|
@ -63,7 +63,12 @@ export async function loadConfig() {
|
|||
// granular settings are loaded correctly and to avoid duplicating the override logic for the theme.
|
||||
//
|
||||
// Note: this isn't called twice for some wrappers, like the Jitsi wrapper.
|
||||
SdkConfig.put(await PlatformPeg.get().getConfig() || {});
|
||||
const platformConfig = await PlatformPeg.get().getConfig();
|
||||
if (platformConfig) {
|
||||
SdkConfig.put(platformConfig);
|
||||
} else {
|
||||
SdkConfig.unset(); // clears the config (sets to empty object)
|
||||
}
|
||||
}
|
||||
|
||||
export function loadOlm(): Promise<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue