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

Commit

Permalink
Remove RoomList sorting settings (#9781)
Browse files Browse the repository at this point in the history
  • Loading branch information
Germain authored Dec 19, 2022
1 parent 8541e1c commit 3ec75fd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
2 changes: 0 additions & 2 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1007,8 +1007,6 @@
"Enable URL previews by default for participants in this room": "Enable URL previews by default for participants in this room",
"Enable widget screenshots on supported widgets": "Enable widget screenshots on supported widgets",
"Prompt before sending invites to potentially invalid matrix IDs": "Prompt before sending invites to potentially invalid matrix IDs",
"Order rooms by name": "Order rooms by name",
"Show rooms with unread notifications first": "Show rooms with unread notifications first",
"Show shortcuts to recently viewed rooms above the room list": "Show shortcuts to recently viewed rooms above the room list",
"Show shortcut to welcome checklist above the room list": "Show shortcut to welcome checklist above the room list",
"Show hidden events in timeline": "Show hidden events in timeline",
Expand Down
12 changes: 0 additions & 12 deletions src/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -885,18 +885,6 @@ export const SETTINGS: { [setting: string]: ISetting } = {
deny: [],
},
},
// TODO: Remove setting: /~https://github.com/vector-im/element-web/issues/14373
"RoomList.orderAlphabetically": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Order rooms by name"),
default: false,
},
// TODO: Remove setting: /~https://github.com/vector-im/element-web/issues/14373
"RoomList.orderByImportance": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Show rooms with unread notifications first"),
default: true,
},
"breadcrumbs": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Show shortcuts to recently viewed rooms above the room list"),
Expand Down
7 changes: 0 additions & 7 deletions src/stores/room-list/RoomListStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ limitations under the License.

import { MatrixClient } from "matrix-js-sdk/src/client";
import { Room } from "matrix-js-sdk/src/models/room";
import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
import { logger } from "matrix-js-sdk/src/logger";
import { EventType } from "matrix-js-sdk/src/@types/event";

Expand Down Expand Up @@ -387,7 +386,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements

// logic must match calculateListOrder
private calculateTagSorting(tagId: TagID): SortAlgorithm {
const settingAlphabetical = SettingsStore.getValue("RoomList.orderAlphabetically", null, true);
const definedSort = this.getTagSorting(tagId);
const storedSort = this.getStoredTagSorting(tagId);

Expand All @@ -397,8 +395,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
let tagSort = SortAlgorithm.Recent;
if (storedSort) {
tagSort = storedSort;
} else if (!isNullOrUndefined(settingAlphabetical)) {
tagSort = settingAlphabetical ? SortAlgorithm.Alphabetic : SortAlgorithm.Recent;
} else if (definedSort) {
tagSort = definedSort;
} // else default (already set)
Expand Down Expand Up @@ -430,7 +426,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
// logic must match calculateTagSorting
private calculateListOrder(tagId: TagID): ListAlgorithm {
const defaultOrder = ListAlgorithm.Importance;
const settingImportance = SettingsStore.getValue("RoomList.orderByImportance", null, true);
const definedOrder = this.getListOrder(tagId);
const storedOrder = this.getStoredListOrder(tagId);

Expand All @@ -440,8 +435,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
let listOrder = defaultOrder;
if (storedOrder) {
listOrder = storedOrder;
} else if (!isNullOrUndefined(settingImportance)) {
listOrder = settingImportance ? ListAlgorithm.Importance : ListAlgorithm.Natural;
} else if (definedOrder) {
listOrder = definedOrder;
} // else default (already set)
Expand Down

0 comments on commit 3ec75fd

Please sign in to comment.