diff --git a/apps/meteor/client/lib/rooms/roomTypes/direct.ts b/apps/meteor/client/lib/rooms/roomTypes/direct.ts index c569ba47a055a..e3288968cb688 100644 --- a/apps/meteor/client/lib/rooms/roomTypes/direct.ts +++ b/apps/meteor/client/lib/rooms/roomTypes/direct.ts @@ -35,7 +35,7 @@ roomCoordinator.add( case RoomSettingsEnum.JOIN_CODE: return false; case RoomSettingsEnum.E2E: - return settings.watch('E2E_Enable') === true; + return settings.peek('E2E_Enable') === true; default: return true; } @@ -73,7 +73,7 @@ roomCoordinator.add( return; } - if (settings.watch('UI_Use_Real_Name') && subscription.fname) { + if (settings.peek('UI_Use_Real_Name') && subscription.fname) { return subscription.fname; } diff --git a/apps/meteor/client/lib/rooms/roomTypes/private.ts b/apps/meteor/client/lib/rooms/roomTypes/private.ts index 31b8fa7ca7f7b..8af650fd671b6 100644 --- a/apps/meteor/client/lib/rooms/roomTypes/private.ts +++ b/apps/meteor/client/lib/rooms/roomTypes/private.ts @@ -32,7 +32,7 @@ roomCoordinator.add( case RoomSettingsEnum.REACT_WHEN_READ_ONLY: return Boolean(!room.broadcast && room.ro); case RoomSettingsEnum.E2E: - return settings.watch('E2E_Enable') === true; + return settings.peek('E2E_Enable') === true; case RoomSettingsEnum.SYSTEM_MESSAGES: default: return true; @@ -55,7 +55,7 @@ roomCoordinator.add( if (roomData.prid || isRoomFederated(roomData)) { return roomData.fname; } - if (settings.watch('UI_Allow_room_names_with_special_chars')) { + if (settings.peek('UI_Allow_room_names_with_special_chars')) { return roomData.fname || roomData.name; } diff --git a/apps/meteor/client/lib/rooms/roomTypes/public.ts b/apps/meteor/client/lib/rooms/roomTypes/public.ts index 00a3006381356..87ebf636c5a10 100644 --- a/apps/meteor/client/lib/rooms/roomTypes/public.ts +++ b/apps/meteor/client/lib/rooms/roomTypes/public.ts @@ -53,7 +53,7 @@ roomCoordinator.add( if (roomData.prid || isRoomFederated(roomData)) { return roomData.fname; } - if (settings.watch('UI_Allow_room_names_with_special_chars')) { + if (settings.peek('UI_Allow_room_names_with_special_chars')) { return roomData.fname || roomData.name; } return roomData.name; diff --git a/apps/meteor/client/views/account/sidebarItems.tsx b/apps/meteor/client/views/account/sidebarItems.tsx index c565adcbcad66..14b06bbf04b81 100644 --- a/apps/meteor/client/views/account/sidebarItems.tsx +++ b/apps/meteor/client/views/account/sidebarItems.tsx @@ -14,7 +14,7 @@ export const { href: '/account/profile', i18nLabel: 'Profile', icon: 'user', - permissionGranted: (): boolean => settings.watch('Accounts_AllowUserProfileChange') ?? true, + permissionGranted: (): boolean => settings.peek('Accounts_AllowUserProfileChange') ?? true, }, { href: '/account/preferences', @@ -26,15 +26,15 @@ export const { i18nLabel: 'Security', icon: 'lock', permissionGranted: (): boolean => - (settings.watch('Accounts_TwoFactorAuthentication_Enabled') ?? true) || - (settings.watch('E2E_Enable') ?? false) || - (settings.watch('Accounts_AllowPasswordChange') ?? true), + (settings.peek('Accounts_TwoFactorAuthentication_Enabled') ?? true) || + (settings.peek('E2E_Enable') ?? false) || + (settings.peek('Accounts_AllowPasswordChange') ?? true), }, { href: '/account/integrations', i18nLabel: 'Integrations', icon: 'code', - permissionGranted: (): boolean => settings.watch('Webdav_Integration_Enabled') ?? false, + permissionGranted: (): boolean => settings.peek('Webdav_Integration_Enabled') ?? false, }, { href: '/account/tokens', @@ -53,7 +53,7 @@ export const { i18nLabel: 'Feature_preview', icon: 'flask', badge: () => , - permissionGranted: () => settings.watch('Accounts_AllowFeaturePreview') && defaultFeaturesPreview?.length > 0, + permissionGranted: () => settings.peek('Accounts_AllowFeaturePreview') && defaultFeaturesPreview?.length > 0, }, { href: '/account/accessibility-and-appearance',