You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-19 05:22:13 +03:00
WIP
This commit is contained in:
@@ -180,6 +180,21 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getTheme: function() {
|
||||
let syncedSettings;
|
||||
let theme;
|
||||
if (MatrixClientPeg.get()) {
|
||||
syncedSettings = this.getSyncedSettings();
|
||||
}
|
||||
if (!syncedSettings || !syncedSettings.theme) {
|
||||
theme = SdkConfig.get().default_theme || 'light';
|
||||
}
|
||||
else {
|
||||
theme = syncedSettings.theme;
|
||||
}
|
||||
return theme;
|
||||
},
|
||||
|
||||
getSyncedSettings: function() {
|
||||
const event = MatrixClientPeg.get().getAccountData('im.vector.web.settings');
|
||||
return event ? event.getContent() : {};
|
||||
|
||||
Reference in New Issue
Block a user