mirror of https://github.com/vector-im/riot-web
set default activity ordering to natural for room list (#10820)
parent
727c885687
commit
d103d2e3dd
|
@ -469,7 +469,7 @@ 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.Natural;
|
||||||
const definedOrder = this.getListOrder(tagId);
|
const definedOrder = this.getListOrder(tagId);
|
||||||
const storedOrder = this.getStoredListOrder(tagId);
|
const storedOrder = this.getStoredListOrder(tagId);
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ describe("RoomListStore", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it.each(OrderedDefaultTagIDs)("defaults to activity ordering for %s=", (tagId) => {
|
it.each(OrderedDefaultTagIDs)("defaults to activity ordering for %s=", (tagId) => {
|
||||||
expect(RoomListStore.instance.getListOrder(tagId)).toBe(ListAlgorithm.Importance);
|
expect(RoomListStore.instance.getListOrder(tagId)).toBe(ListAlgorithm.Natural);
|
||||||
});
|
});
|
||||||
|
|
||||||
function createStore(): { store: RoomListStoreClass; handleRoomUpdate: jest.Mock<any, any> } {
|
function createStore(): { store: RoomListStoreClass; handleRoomUpdate: jest.Mock<any, any> } {
|
||||||
|
|
Loading…
Reference in New Issue