You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-09 08:42:50 +03:00
set default activity ordering to natural for room list (#10820)
This commit is contained in:
@@ -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> } {
|
||||||
|
Reference in New Issue
Block a user