From 474c807e8e250897b1e960f16b86300d47e60541 Mon Sep 17 00:00:00 2001 From: Echo Date: Mon, 13 Jul 2026 16:18:40 +0200 Subject: [PATCH] Adds feature flag for 5.0 redesign (#39802) --- app/javascript/mastodon/utils/environment.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/utils/environment.ts b/app/javascript/mastodon/utils/environment.ts index e2936bd224..9e30be6587 100644 --- a/app/javascript/mastodon/utils/environment.ts +++ b/app/javascript/mastodon/utils/environment.ts @@ -18,7 +18,7 @@ export function isServerFeatureEnabled(feature: ServerFeatures) { return initialState?.features.includes(feature) ?? false; } -type ClientFeatures = never; +type ClientFeatures = 'redesign'; export function isClientFeatureEnabled(feature: ClientFeatures) { try { @@ -30,3 +30,8 @@ export function isClientFeatureEnabled(feature: ClientFeatures) { return false; } } + +/* Checks if the 5.0 redesign features are enabled or not. */ +export function isRedesignEnabled() { + return isClientFeatureEnabled('redesign'); +}