First attempt alpha room list sorting

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-02-18 14:55:12 +00:00
parent 8087f18bf7
commit 932c9b3106
7 changed files with 173 additions and 66 deletions

View file

@ -26,6 +26,7 @@ import CustomStatusController from "./controllers/CustomStatusController";
import ThemeController from './controllers/ThemeController';
import ReloadOnChangeController from "./controllers/ReloadOnChangeController";
import {RIGHT_PANEL_PHASES} from "../stores/RightPanelStorePhases";
import RoomListOrderingController from "./controllers/RoomListOrderingController";
// These are just a bunch of helper arrays to avoid copy/pasting a bunch of times
const LEVELS_ROOM_SETTINGS = ['device', 'room-device', 'room-account', 'account', 'config'];
@ -433,14 +434,20 @@ export const SETTINGS = {
deny: [],
},
},
"RoomList.orderingAlgorithm": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Order rooms by message activity instead of by name"),
default: "recent", // XXX controller maps boolean onto algorithm for future flexibility
controller: new RoomListOrderingController(),
},
"RoomList.orderByImportance": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Order rooms in the room list by most important first instead of most recent'),
displayName: _td("Show rooms with unread notifications first"),
default: true,
},
"breadcrumbs": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Show recently visited rooms above the room list"),
displayName: _td("Show shortcuts to recently viewed rooms above the room list"),
default: true,
},
"showHiddenEventsInTimeline": {