mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
c68eb57798
@ -160,32 +160,26 @@ class RoomListStore extends Store {
|
||||
});
|
||||
|
||||
const listOrders = {
|
||||
"manual": [
|
||||
"m.favourite",
|
||||
],
|
||||
"recent": [
|
||||
"im.vector.fake.invite",
|
||||
"im.vector.fake.recent",
|
||||
"im.vector.fake.direct",
|
||||
"m.lowpriority",
|
||||
"im.vector.fake.archived",
|
||||
],
|
||||
"m.favourite": "manual",
|
||||
"im.vector.fake.invite": "recent",
|
||||
"im.vector.fake.recent": "recent",
|
||||
"im.vector.fake.direct": "recent",
|
||||
"m.lowpriority": "recent",
|
||||
"im.vector.fake.archived": "recent",
|
||||
};
|
||||
|
||||
Object.keys(listOrders).forEach((order) => {
|
||||
listOrders[order].forEach((listKey) => {
|
||||
let comparator;
|
||||
switch (order) {
|
||||
case "recent":
|
||||
comparator = this._recentsComparator;
|
||||
break;
|
||||
case "manual":
|
||||
default:
|
||||
comparator = this._getManualComparator(listKey, optimisticRequest);
|
||||
break;
|
||||
}
|
||||
lists[listKey].sort(comparator);
|
||||
});
|
||||
Object.keys(lists).forEach((listKey) => {
|
||||
let comparator;
|
||||
switch (listOrders[listKey]) {
|
||||
case "recent":
|
||||
comparator = this._recentsComparator;
|
||||
break;
|
||||
case "manual":
|
||||
default:
|
||||
comparator = this._getManualComparator(listKey, optimisticRequest);
|
||||
break;
|
||||
}
|
||||
lists[listKey].sort(comparator);
|
||||
});
|
||||
|
||||
this._setState({
|
||||
|
Loading…
Reference in New Issue
Block a user