decord/source/modules/themes/experiments/MobileVisualRefreshExperiment.tsx

25 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1348
// Function ID: 1349
2026-07-20 16:05:17 +00:00
// Name: useIsMobileVisualRefreshExperimentEnabled
2026-07-29 08:29:29 +00:00
// Dependencies: [1349, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, isMobileVisualRefreshEnabled, resolveRefreshToken, useMobileVisualRefreshConfig
2026-07-29 08:29:29 +00:00
// Module 1348 (useIsMobileVisualRefreshExperimentEnabled)
const tmp2 = require("getUnitId")({ kind: "user", name: "2026-02-mobile-visual-refresh", defaultConfig: { enabled: false, chatInputFloating: false, chatInputLegacySendButton: false }, variations: { 0: { enabled: false, chatInputFloating: false, chatInputLegacySendButton: false }, 1: { enabled: true, chatInputFloating: false, chatInputLegacySendButton: false }, 2: { enabled: true, chatInputFloating: true, chatInputLegacySendButton: false }, 3: { enabled: true, chatInputFloating: true, chatInputLegacySendButton: false }, 4: { enabled: true, chatInputFloating: true, chatInputLegacySendButton: true } } });
let c0 = tmp2;
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/themes/experiments/MobileVisualRefreshExperiment.tsx");
2026-07-20 16:05:17 +00:00
export default function useIsMobileVisualRefreshExperimentEnabled(location) {
return tmp2.useConfig({ location }).enabled;
};
export const MobileVisualRefreshExperiment = tmp2;
export const useMobileVisualRefreshConfig = function useMobileVisualRefreshConfig(location) {
return tmp2.useConfig({ location: location.location });
};
2026-07-29 08:29:29 +00:00
export const isMobileVisualRefreshEnabled = function isMobileVisualRefreshEnabled(ClientThemesBackgroundStore) {
return tmp2.getConfig({ location: ClientThemesBackgroundStore }).enabled;
2026-07-20 16:05:17 +00:00
};
export const resolveRefreshToken = function resolveRefreshToken(CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND, chatInputFloating) {
2026-07-23 10:11:24 +00:00
return CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND.resolve({ enabledExperiments: chatInputFloating ? ["mobile-visual-refresh"] : [] });
2026-07-20 16:05:17 +00:00
};