Remove RoomList sorting settings (#9781)

pull/28217/head
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 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", "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", "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 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 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", "Show hidden events in timeline": "Show hidden events in timeline",

View File

@ -885,18 +885,6 @@ export const SETTINGS: { [setting: string]: ISetting } = {
deny: [], 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": { "breadcrumbs": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS, supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Show shortcuts to recently viewed rooms above the room list"), 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 { MatrixClient } from "matrix-js-sdk/src/client";
import { Room } from "matrix-js-sdk/src/models/room"; 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 { logger } from "matrix-js-sdk/src/logger";
import { EventType } from "matrix-js-sdk/src/@types/event"; import { EventType } from "matrix-js-sdk/src/@types/event";
@ -387,7 +386,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
// logic must match calculateListOrder // logic must match calculateListOrder
private calculateTagSorting(tagId: TagID): SortAlgorithm { private calculateTagSorting(tagId: TagID): SortAlgorithm {
const settingAlphabetical = SettingsStore.getValue("RoomList.orderAlphabetically", null, true);
const definedSort = this.getTagSorting(tagId); const definedSort = this.getTagSorting(tagId);
const storedSort = this.getStoredTagSorting(tagId); const storedSort = this.getStoredTagSorting(tagId);
@ -397,8 +395,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
let tagSort = SortAlgorithm.Recent; let tagSort = SortAlgorithm.Recent;
if (storedSort) { if (storedSort) {
tagSort = storedSort; tagSort = storedSort;
} else if (!isNullOrUndefined(settingAlphabetical)) {
tagSort = settingAlphabetical ? SortAlgorithm.Alphabetic : SortAlgorithm.Recent;
} else if (definedSort) { } else if (definedSort) {
tagSort = definedSort; tagSort = definedSort;
} // else default (already set) } // else default (already set)
@ -430,7 +426,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
// logic must match calculateTagSorting // logic must match calculateTagSorting
private calculateListOrder(tagId: TagID): ListAlgorithm { private calculateListOrder(tagId: TagID): ListAlgorithm {
const defaultOrder = ListAlgorithm.Importance; const defaultOrder = ListAlgorithm.Importance;
const settingImportance = SettingsStore.getValue("RoomList.orderByImportance", null, true);
const definedOrder = this.getListOrder(tagId); const definedOrder = this.getListOrder(tagId);
const storedOrder = this.getStoredListOrder(tagId); const storedOrder = this.getStoredListOrder(tagId);
@ -440,8 +435,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
let listOrder = defaultOrder; let listOrder = defaultOrder;
if (storedOrder) { if (storedOrder) {
listOrder = storedOrder; listOrder = storedOrder;
} else if (!isNullOrUndefined(settingImportance)) {
listOrder = settingImportance ? ListAlgorithm.Importance : ListAlgorithm.Natural;
} else if (definedOrder) { } else if (definedOrder) {
listOrder = definedOrder; listOrder = definedOrder;
} // else default (already set) } // else default (already set)