diff --git a/docs/config.md b/docs/config.md index c8773544fe..5856ce8c43 100644 --- a/docs/config.md +++ b/docs/config.md @@ -581,8 +581,6 @@ Currently, the following UI feature flags are supported: This should only be used if the room history visibility options are managed by the server. - `UIFeature.TimelineEnableRelativeDates` - Display relative date separators (eg: 'Today', 'Yesterday') in the timeline for recent messages. When false day dates will be used. -- `UIFeature.BulkUnverifiedSessionsReminder` - Display popup reminders to verify or remove unverified sessions. Defaults - to true. - `UIFeature.locationSharing` - Whether or not location sharing menus will be shown. - `UIFeature.allowCreatingPublicRooms` - Whether or not public rooms can be created. - `UIFeature.allowCreatingPublicSpaces` - Whether or not public spaces can be created. diff --git a/src/DeviceListener.ts b/src/DeviceListener.ts index 410f40add8..e9c723b75d 100644 --- a/src/DeviceListener.ts +++ b/src/DeviceListener.ts @@ -43,7 +43,6 @@ import SdkConfig from "./SdkConfig"; import PlatformPeg from "./PlatformPeg"; import { recordClientInformation, removeClientInformation } from "./utils/device/clientInformation"; import SettingsStore, { type CallbackFn } from "./settings/SettingsStore"; -import { UIFeature } from "./settings/UIFeature"; import { isBulkUnverifiedDeviceReminderSnoozed } from "./utils/device/snoozeBulkUnverifiedDeviceReminder"; import { getUserDeviceIds } from "./utils/crypto/deviceInfo"; import { asyncSomeParallel } from "./utils/arrays.ts"; @@ -125,7 +124,6 @@ export default class DeviceListener extends TypedEventEmitter 0 && - isCurrentDeviceTrusted && - this.enableBulkUnverifiedSessionsReminder && - !isBulkUnverifiedSessionsReminderSnoozed - ) { + if (oldUnverifiedDeviceIds.size > 0 && isCurrentDeviceTrusted && !isBulkUnverifiedSessionsReminderSnoozed) { showBulkUnverifiedSessionsToast(oldUnverifiedDeviceIds); } else { hideBulkUnverifiedSessionsToast(); diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index 8c57e234ae..b871152d8f 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -1437,10 +1437,6 @@ export const SETTINGS: Settings = { supportedLevels: LEVELS_UI_FEATURE, default: true, }, - [UIFeature.BulkUnverifiedSessionsReminder]: { - supportedLevels: LEVELS_UI_FEATURE, - default: true, - }, [UIFeature.AllowCreatingPublicSpaces]: { supportedLevels: LEVELS_UI_FEATURE, default: true, diff --git a/src/settings/UIFeature.ts b/src/settings/UIFeature.ts index 12b0c7c089..0215b79175 100644 --- a/src/settings/UIFeature.ts +++ b/src/settings/UIFeature.ts @@ -24,7 +24,6 @@ export const enum UIFeature { AdvancedSettings = "UIFeature.advancedSettings", RoomHistorySettings = "UIFeature.roomHistorySettings", TimelineEnableRelativeDates = "UIFeature.timelineEnableRelativeDates", - BulkUnverifiedSessionsReminder = "UIFeature.BulkUnverifiedSessionsReminder", AllowCreatingPublicRooms = "UIFeature.allowCreatingPublicRooms", AllowCreatingPublicSpaces = "UIFeature.allowCreatingPublicSpaces", } diff --git a/test/unit-tests/DeviceListener-test.ts b/test/unit-tests/DeviceListener-test.ts index 4810d82001..f9339cd38b 100644 --- a/test/unit-tests/DeviceListener-test.ts +++ b/test/unit-tests/DeviceListener-test.ts @@ -35,7 +35,6 @@ import { Action } from "../../src/dispatcher/actions"; import SettingsStore from "../../src/settings/SettingsStore"; import { SettingLevel } from "../../src/settings/SettingLevel"; import { getMockClientWithEventEmitter, mockPlatformPeg } from "../test-utils"; -import { UIFeature } from "../../src/settings/UIFeature"; import { isBulkUnverifiedDeviceReminderSnoozed } from "../../src/utils/device/snoozeBulkUnverifiedDeviceReminder"; import { PosthogAnalytics } from "../../src/PosthogAnalytics"; @@ -653,10 +652,8 @@ describe("DeviceListener", () => { // all devices verified by default mockCrypto!.getDeviceVerificationStatus.mockResolvedValue(deviceTrustVerified); mockClient!.deviceId = currentDevice.deviceId; - jest.spyOn(SettingsStore, "getValue").mockImplementation( - (settingName) => settingName === UIFeature.BulkUnverifiedSessionsReminder, - ); }); + describe("bulk unverified sessions toasts", () => { it("hides toast when cross signing is not ready", async () => { mockCrypto!.isCrossSigningReady.mockResolvedValue(false); @@ -671,24 +668,6 @@ describe("DeviceListener", () => { expect(BulkUnverifiedSessionsToast.showToast).not.toHaveBeenCalled(); }); - it("hides toast when feature is disabled", async () => { - // BulkUnverifiedSessionsReminder set to false - jest.spyOn(SettingsStore, "getValue").mockReturnValue(false); - // currentDevice, device2 are verified, device3 is unverified - // ie if reminder was enabled it should be shown - mockCrypto!.getDeviceVerificationStatus.mockImplementation(async (_userId, deviceId) => { - switch (deviceId) { - case currentDevice.deviceId: - case device2.deviceId: - return deviceTrustVerified; - default: - return deviceTrustUnverified; - } - }); - await createAndStart(); - expect(BulkUnverifiedSessionsToast.hideToast).toHaveBeenCalled(); - }); - it("hides toast when current device is unverified", async () => { // device2 verified, current and device3 unverified mockCrypto!.getDeviceVerificationStatus.mockImplementation(async (_userId, deviceId) => {