Unread Sorting - Add option for sorting in OptionsMenuView (#31754)
* Add new sort option * Support new sorting algorithm in vm * Add option item for unread sorter * Add tests
This commit is contained in:
@@ -271,6 +271,7 @@ describe("RoomListHeaderViewModel", () => {
|
||||
it.each([
|
||||
["recent" as const, SortingAlgorithm.Recency],
|
||||
["alphabetical" as const, SortingAlgorithm.Alphabetic],
|
||||
["unread-first" as const, SortingAlgorithm.Unread],
|
||||
])("should resort when sort is called with '%s'", (option, expectedAlgorithm) => {
|
||||
const resortSpy = jest.spyOn(RoomListStoreV3.instance, "resort").mockImplementation(jest.fn());
|
||||
vm = new RoomListHeaderViewModel({ matrixClient, spaceStore: SpaceStore.instance });
|
||||
|
||||
Reference in New Issue
Block a user