Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 3c436c9

Browse files
committed
update setting naming to match style
1 parent 02dbdc5 commit 3c436c9

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class PreferencesUserSettingsTab extends React.Component<{}, ISta
4949
];
5050

5151
static SPACES_SETTINGS = [
52-
"Spaces.all_rooms_in_home",
52+
"Spaces.allRoomsInHome",
5353
];
5454

5555
static KEYBINDINGS_SETTINGS = [

src/components/views/spaces/SpacePanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const HomeButtonContextMenu = ({ onFinished, ...props }: ComponentProps<typeof S
8383
label={_t("Show all rooms")}
8484
active={allRoomsInHome}
8585
onClick={() => {
86-
SettingsStore.setValue("Spaces.all_rooms_in_home", null, SettingLevel.ACCOUNT, !allRoomsInHome);
86+
SettingsStore.setValue("Spaces.allRoomsInHome", null, SettingLevel.ACCOUNT, !allRoomsInHome);
8787
}}
8888
/>
8989
</IconizedContextMenuOptionList>

src/settings/Settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ export const SETTINGS: {[setting: string]: ISetting} = {
749749
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
750750
default: null,
751751
},
752-
"Spaces.all_rooms_in_home": {
752+
"Spaces.allRoomsInHome": {
753753
displayName: _td("Show all rooms in Home"),
754754
description: _td("All rooms you're in will appear in Home."),
755755
supportedLevels: LEVELS_ACCOUNT_SETTINGS,

src/stores/SpaceStore.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
117117
private _invitedSpaces = new Set<Room>();
118118
private spaceOrderLocalEchoMap = new Map<string, string>();
119119
private _restrictedJoinRuleSupport?: IRoomCapability;
120-
private _allRoomsInHome: boolean = SettingsStore.getValue("Spaces.all_rooms_in_home");
120+
private _allRoomsInHome: boolean = SettingsStore.getValue("Spaces.allRoomsInHome");
121121

122122
constructor() {
123123
super(defaultDispatcher, {});
124124

125-
SettingsStore.monitorSetting("Spaces.all_rooms_in_home", null);
125+
SettingsStore.monitorSetting("Spaces.allRoomsInHome", null);
126126
}
127127

128128
public get invitedSpaces(): Room[] {
@@ -812,8 +812,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
812812

813813
case Action.SettingUpdated: {
814814
const settingUpdatedPayload = payload as SettingUpdatedPayload;
815-
if (settingUpdatedPayload.settingName === "Spaces.all_rooms_in_home") {
816-
const newValue = SettingsStore.getValue("Spaces.all_rooms_in_home");
815+
if (settingUpdatedPayload.settingName === "Spaces.allRoomsInHome") {
816+
const newValue = SettingsStore.getValue("Spaces.allRoomsInHome");
817817
if (this.allRoomsInHome !== newValue) {
818818
this._allRoomsInHome = newValue;
819819
this.emit(UPDATE_HOME_BEHAVIOUR, this.allRoomsInHome);

test/stores/SpaceStore-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe("SpaceStore", () => {
8585
const setShowAllRooms = async (value: boolean) => {
8686
if (store.allRoomsInHome === value) return;
8787
const emitProm = testUtils.emitPromise(store, UPDATE_HOME_BEHAVIOUR);
88-
await SettingsStore.setValue("Spaces.all_rooms_in_home", null, SettingLevel.DEVICE, value);
88+
await SettingsStore.setValue("Spaces.allRoomsInHome", null, SettingLevel.DEVICE, value);
8989
jest.runAllTimers(); // run async dispatch
9090
await emitProm;
9191
};

test/stores/room-list/SpaceWatcher-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe("SpaceWatcher", () => {
4747

4848
const setShowAllRooms = async (value: boolean) => {
4949
if (store.allRoomsInHome === value) return;
50-
await SettingsStore.setValue("Spaces.all_rooms_in_home", null, SettingLevel.DEVICE, value);
50+
await SettingsStore.setValue("Spaces.allRoomsInHome", null, SettingLevel.DEVICE, value);
5151
await testUtils.emitPromise(store, UPDATE_HOME_BEHAVIOUR);
5252
};
5353

0 commit comments

Comments
 (0)