mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Appease the linter
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
10519f9465
commit
781b94c8f4
9 changed files with 14 additions and 13 deletions
|
@ -1118,7 +1118,7 @@ module.exports = React.createClass({
|
|||
if (cli.isCryptoEnabled()) {
|
||||
const blacklistEnabled = SettingsStore.getValueAt(
|
||||
SettingLevel.DEVICE,
|
||||
"blacklistUnverifiedDevices"
|
||||
"blacklistUnverifiedDevices",
|
||||
);
|
||||
cli.setGlobalBlacklistUnverifiedDevices(blacklistEnabled);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ limitations under the License.
|
|||
import React from 'react';
|
||||
|
||||
import sdk from '../../../index';
|
||||
import UserSettingsStore from '../../../UserSettingsStore';
|
||||
import * as languageHandler from '../../../languageHandler';
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ module.exports = React.createClass({
|
|||
this.props.name,
|
||||
this.props.roomId,
|
||||
this.props.level,
|
||||
val !== undefined ? val : this.state.value
|
||||
val !== undefined ? val : this.state.value,
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ export const SETTINGS = {
|
|||
},
|
||||
"language": {
|
||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
||||
default: "en"
|
||||
default: "en",
|
||||
},
|
||||
"analyticsOptOut": {
|
||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
||||
|
@ -240,4 +240,4 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||
default: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import Promise from 'bluebird';
|
||||
import DeviceSettingsHandler from "./handlers/DeviceSettingsHandler";
|
||||
import RoomDeviceSettingsHandler from "./handlers/RoomDeviceSettingsHandler";
|
||||
import DefaultSettingsHandler from "./handlers/DefaultSettingsHandler";
|
||||
|
@ -210,14 +209,14 @@ export default class SettingsStore {
|
|||
const handlers = SettingsStore._getHandlers(settingName);
|
||||
|
||||
if (explicit) {
|
||||
let handler = handlers[level];
|
||||
const handler = handlers[level];
|
||||
if (!handler) return SettingsStore._tryControllerOverride(settingName, level, roomId, null);
|
||||
const value = handler.getValue(settingName, roomId);
|
||||
return SettingsStore._tryControllerOverride(settingName, level, roomId, value);
|
||||
}
|
||||
|
||||
for (let i = minIndex; i < LEVEL_ORDER.length; i++) {
|
||||
let handler = handlers[LEVEL_ORDER[i]];
|
||||
const handler = handlers[LEVEL_ORDER[i]];
|
||||
if (!handler) continue;
|
||||
if (excludeDefault && LEVEL_ORDER[i] === "default") continue;
|
||||
|
||||
|
|
|
@ -46,4 +46,4 @@ export default class SettingController {
|
|||
onChange(level, roomId, newValue) {
|
||||
// do nothing by default
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import Promise from 'bluebird';
|
||||
import SettingsHandler from "./SettingsHandler";
|
||||
import SdkConfig from "../../SdkConfig";
|
||||
|
||||
|
|
|
@ -66,4 +66,4 @@ export default class LocalEchoWrapper extends SettingsHandler {
|
|||
isSupported() {
|
||||
return this._handler.isSupported();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import Promise from "bluebird";
|
||||
|
||||
/**
|
||||
* Represents the base class for all level handlers. This class performs no logic
|
||||
* and should be overridden.
|
||||
|
@ -28,7 +30,8 @@ export default class SettingsHandler {
|
|||
* @returns {*} The setting value, or null if not found.
|
||||
*/
|
||||
getValue(settingName, roomId) {
|
||||
throw new Error("Operation not possible: getValue was not overridden");
|
||||
console.error("Invalid operation: getValue was not overridden");
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,7 +46,8 @@ export default class SettingsHandler {
|
|||
* @returns {Promise} Resolves when the setting has been saved.
|
||||
*/
|
||||
setValue(settingName, roomId, newValue) {
|
||||
throw new Error("Operation not possible: setValue was not overridden");
|
||||
console.error("Invalid operation: setValue was not overridden");
|
||||
return Promise.reject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue