Add labs flag for Threads Activity Centre (#12137)
* Add `Thread Activity centre` labs flag * Rename translation string * Update supportedLevels * Fix labs subsection test * Update Threads Activity Centre label * Make threads activity centre labs flag split out unread counts Just shows notif & unread counts for main thread if the TAC is enabled. * Fix tests * Simpler fix * Pass in & cache the status of the TAC labs flag * Pass includeThreads as setting to doesRoomHaveUnreadMessages too * Fix tests --------- Co-authored-by: David Baker <dbkr@users.noreply.github.com>
This commit is contained in:
parent
a370a5cfa4
commit
77e1649f0b
15 changed files with 111 additions and 56 deletions
|
@ -812,8 +812,11 @@ function createRoom(info: IRoomCreationInfo) {
|
|||
const userId = client.getUserId()!;
|
||||
if (info.isDm) {
|
||||
client.getAccountData = (eventType) => {
|
||||
expect(eventType).toEqual("m.direct");
|
||||
return mkDirectEvent(roomId, userId, info.userIds);
|
||||
if (eventType === "m.direct") {
|
||||
return mkDirectEvent(roomId, userId, info.userIds);
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ describe("<VideoRoomChatButton />", () => {
|
|||
};
|
||||
|
||||
const mockRoomNotificationState = (room: Room, level: NotificationLevel): RoomNotificationState => {
|
||||
const roomNotificationState = new RoomNotificationState(room);
|
||||
const roomNotificationState = new RoomNotificationState(room, false);
|
||||
|
||||
// @ts-ignore ugly mocking
|
||||
roomNotificationState._level = level;
|
||||
|
|
|
@ -60,7 +60,7 @@ describe("<LabsUserSettingsTab />", () => {
|
|||
// non-beta labs section
|
||||
expect(screen.getByText("Early previews")).toBeInTheDocument();
|
||||
const labsSections = container.getElementsByClassName("mx_SettingsSubsection");
|
||||
expect(labsSections).toHaveLength(9);
|
||||
expect(labsSections).toHaveLength(10);
|
||||
});
|
||||
|
||||
describe("Rust crypto setting", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue