Remove RoomList sorting settings (#9781)

This commit is contained in:
Germain 2022-12-19 11:57:57 +00:00 committed by GitHub
parent 8541e1c4b5
commit 3ec75fdd3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 21 deletions

View file

@ -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",

View file

@ -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"),

View file

@ -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";
@ -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);
@ -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)
@ -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);
@ -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)