Remove threads labs flag and the ability to disable threads (#9878)
This commit is contained in:
parent
a09e105c23
commit
8c22584f64
34 changed files with 197 additions and 501 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
Copyright 2022 - 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -23,7 +23,6 @@ import React from "react";
|
|||
|
||||
import RoomHeaderButtons from "../../../../src/components/views/right_panel/RoomHeaderButtons";
|
||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||
import SettingsStore from "../../../../src/settings/SettingsStore";
|
||||
import { mkEvent, stubClient } from "../../../test-utils";
|
||||
import { mkThread } from "../../../test-utils/threads";
|
||||
|
||||
|
@ -41,10 +40,6 @@ describe("RoomHeaderButtons-test.tsx", function () {
|
|||
room = new Room(ROOM_ID, client, client.getUserId() ?? "", {
|
||||
pendingEventOrdering: PendingEventOrdering.Detached,
|
||||
});
|
||||
|
||||
jest.spyOn(SettingsStore, "getValue").mockImplementation((name: string) => {
|
||||
if (name === "feature_threadenabled") return true;
|
||||
});
|
||||
});
|
||||
|
||||
function getComponent(room?: Room) {
|
||||
|
@ -64,12 +59,6 @@ describe("RoomHeaderButtons-test.tsx", function () {
|
|||
expect(getThreadButton(container)).not.toBeNull();
|
||||
});
|
||||
|
||||
it("hides the thread button", () => {
|
||||
jest.spyOn(SettingsStore, "getValue").mockReset().mockReturnValue(false);
|
||||
const { container } = getComponent(room);
|
||||
expect(getThreadButton(container)).toBeNull();
|
||||
});
|
||||
|
||||
it("room wide notification does not change the thread button", () => {
|
||||
room.setUnreadNotificationCount(NotificationCountType.Highlight, 1);
|
||||
room.setUnreadNotificationCount(NotificationCountType.Total, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue