1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-19 05:22:13 +03:00
This commit is contained in:
Matthew Hodgson
2017-10-23 00:56:15 +01:00
parent 37fd19290f
commit f09fbccc19
5 changed files with 117 additions and 13 deletions

View File

@@ -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() : {};