Drop the idea of "config" being automatically supported
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
0d3f0eaf98
commit
52f227cb3b
1 changed files with 9 additions and 5 deletions
|
@ -27,13 +27,13 @@ import SdkConfig from "../SdkConfig";
|
||||||
|
|
||||||
// Preset levels for room-based settings (eg: URL previews).
|
// Preset levels for room-based settings (eg: URL previews).
|
||||||
// Doesn't include 'room' because most settings don't need it. Use .concat('room') to add.
|
// Doesn't include 'room' because most settings don't need it. Use .concat('room') to add.
|
||||||
const LEVELS_PRESET_ROOM = ['device', 'room-device', 'room-account', 'account'];
|
const LEVELS_PRESET_ROOM = ['device', 'room-device', 'room-account', 'account', 'config'];
|
||||||
|
|
||||||
// Preset levels for account-based settings (eg: interface language).
|
// Preset levels for account-based settings (eg: interface language).
|
||||||
const LEVELS_PRESET_ACCOUNT = ['device', 'account'];
|
const LEVELS_PRESET_ACCOUNT = ['device', 'account', 'config'];
|
||||||
|
|
||||||
// Preset levels for features (labs) settings.
|
// Preset levels for features (labs) settings.
|
||||||
const LEVELS_PRESET_FEATURE = ['device'];
|
const LEVELS_PRESET_FEATURE = ['device', 'config'];
|
||||||
|
|
||||||
const SETTINGS = {
|
const SETTINGS = {
|
||||||
// EXAMPLE SETTING:
|
// EXAMPLE SETTING:
|
||||||
|
@ -51,8 +51,9 @@ const SETTINGS = {
|
||||||
// "room-account", // Affects the current room for the current account
|
// "room-account", // Affects the current room for the current account
|
||||||
// "account", // Affects the current account
|
// "account", // Affects the current account
|
||||||
// "room", // Affects the current room (controlled by room admins)
|
// "room", // Affects the current room (controlled by room admins)
|
||||||
|
// "config", // Affects the current application
|
||||||
//
|
//
|
||||||
// // "default" and "config" are always supported and do not get listed here.
|
// // "default" is always supported and does not get listed here.
|
||||||
// ],
|
// ],
|
||||||
//
|
//
|
||||||
// // Optional. Any data type.
|
// // Optional. Any data type.
|
||||||
|
@ -191,7 +192,7 @@ const SETTINGS = {
|
||||||
supportedLevels: ['device'],
|
supportedLevels: ['device'],
|
||||||
default: false,
|
default: false,
|
||||||
label: _td('Never send encrypted messages to unverified devices from this device'),
|
label: _td('Never send encrypted messages to unverified devices from this device'),
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert the above into simpler formats for the handlers
|
// Convert the above into simpler formats for the handlers
|
||||||
|
@ -414,6 +415,9 @@ export default class SettingsStore {
|
||||||
handlers[level] = LEVEL_HANDLERS[level];
|
handlers[level] = LEVEL_HANDLERS[level];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always support 'default'
|
||||||
|
if (!handlers['default']) handlers['default'] = LEVEL_HANDLERS['default'];
|
||||||
|
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue