mirror of https://github.com/vector-im/riot-web
small tweaks, still not working reliably
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
4278d44059
commit
d70a9bd001
|
@ -437,7 +437,7 @@ export const SETTINGS = {
|
|||
"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
|
||||
default: "recent", // controller maps boolean onto algorithm for future flexibility to >2 algorithms
|
||||
controller: new RoomListOrderingController(),
|
||||
},
|
||||
"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.
|
||||
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 New Issue