Move SettingLevel to its own file

pull/21833/head
Travis Ralston 2020-07-28 11:37:59 -06:00
parent 79348b44cb
commit 4db4625e34
2 changed files with 32 additions and 12 deletions

View File

@ -0,0 +1,29 @@
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* Represents the various setting levels supported by the SettingsStore.
*/
export enum SettingLevel {
// TODO: [TS] Follow naming convention
DEVICE = "device",
ROOM_DEVICE = "room-device",
ROOM_ACCOUNT = "room-account",
ACCOUNT = "account",
ROOM = "room",
CONFIG = "config",
DEFAULT = "default",
}

View File

@ -28,21 +28,12 @@ import dis from '../dispatcher/dispatcher';
import {SETTINGS} from "./Settings"; import {SETTINGS} from "./Settings";
import LocalEchoWrapper from "./handlers/LocalEchoWrapper"; import LocalEchoWrapper from "./handlers/LocalEchoWrapper";
import {WatchManager} from "./WatchManager"; import {WatchManager} from "./WatchManager";
import {SettingLevel as SL2} from "./SettingLevel";
/** /**
* Represents the various setting levels supported by the SettingsStore. * @deprecated Use SettingLevel directly
*/ */
export const SettingLevel = { export const SettingLevel = SL2;
// Note: This enum is not used in this class or in the Settings file
// This should always be used elsewhere in the project.
DEVICE: "device",
ROOM_DEVICE: "room-device",
ROOM_ACCOUNT: "room-account",
ACCOUNT: "account",
ROOM: "room",
CONFIG: "config",
DEFAULT: "default",
};
const defaultWatchManager = new WatchManager(); const defaultWatchManager = new WatchManager();