RoomListStore: Unread filter should only filter rooms having unread counts (#29555)
* Use `hasUnreadCount` instead of `isUnread` * Fix broken test * Write test
This commit is contained in:
@@ -457,7 +457,7 @@ describe("RoomListStoreV3", () => {
|
||||
// Let's say 8, 27 are unread
|
||||
jest.spyOn(RoomNotificationStateStore.instance, "getRoomState").mockImplementation((room) => {
|
||||
const state = {
|
||||
isUnread: [rooms[8], rooms[27]].includes(room),
|
||||
hasUnreadCount: [rooms[8], rooms[27]].includes(room),
|
||||
} as unknown as RoomNotificationState;
|
||||
return state;
|
||||
});
|
||||
@@ -588,7 +588,7 @@ describe("RoomListStoreV3", () => {
|
||||
// Let's say 8, 27 are unread
|
||||
jest.spyOn(RoomNotificationStateStore.instance, "getRoomState").mockImplementation((room) => {
|
||||
const state = {
|
||||
isUnread: [rooms[8], rooms[27]].includes(room),
|
||||
hasUnreadCount: [rooms[8], rooms[27]].includes(room),
|
||||
} as unknown as RoomNotificationState;
|
||||
return state;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user