mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
small tweaks, still not working reliably
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4278d44059
commit
d70a9bd001
2 changed files with 11 additions and 1 deletions
|
@ -437,7 +437,7 @@ export const SETTINGS = {
|
||||||
"RoomList.orderingAlgorithm": {
|
"RoomList.orderingAlgorithm": {
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
displayName: _td("Order rooms by message activity instead of by name"),
|
displayName: _td("Order rooms by message activity instead of by name"),
|
||||||
default: "recent", // XXX controller maps boolean onto algorithm for future flexibility
|
default: "recent", // controller maps boolean onto algorithm for future flexibility to >2 algorithms
|
||||||
controller: new RoomListOrderingController(),
|
controller: new RoomListOrderingController(),
|
||||||
},
|
},
|
||||||
"RoomList.orderByImportance": {
|
"RoomList.orderByImportance": {
|
||||||
|
|
|
@ -22,4 +22,14 @@ export default class RoomListOrderingController extends SettingController {
|
||||||
// where we may want >2 algorithms available for the user to choose between.
|
// where we may want >2 algorithms available for the user to choose between.
|
||||||
return newValue ? "recent" : "alphabetic";
|
return newValue ? "recent" : "alphabetic";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getValueOverride(level: string, roomId: String, calculatedValue: *, calculatedAtLevel: string): * {
|
||||||
|
switch (calculatedValue) {
|
||||||
|
case "alphabetic":
|
||||||
|
return false;
|
||||||
|
case "recent":
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue