WIP
This commit is contained in:
parent
37fd19290f
commit
f09fbccc19
5 changed files with 117 additions and 13 deletions
|
@ -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() : {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue