decord/source/modules/chat/native/NativeExperimentBridgeManager.tsx

106 lines
4.5 KiB
TypeScript
Raw Normal View History

2026-09-02 09:53:35 +00:00
// Module ID: 17637
// Function ID: 17638
2026-07-29 08:29:29 +00:00
// Name: syncYYTextReplacementExperiment
2026-09-02 09:53:35 +00:00
// Dependencies: [17, 1995, 1215, 1234, 17638, 5227, 17639, 695, 17640, 527, 5494, 2]
2026-07-20 16:05:17 +00:00
2026-09-02 09:53:35 +00:00
// Module 17637 (syncYYTextReplacementExperiment)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-09-02 09:53:35 +00:00
import sendRequest from "sendRequest" /* 527 */;
import expandEventPropertiesDefault from "expandEventProperties" /* 695 */;
import set2 from "set" /* 1234 */;
import initializeDefault from "initialize" /* 5494 */;
import shouldEnableYYTextReplacement from "shouldEnableYYTextReplacement" /* 17638 */;
import apexExperimentDefault from "apexExperiment" /* 17640 */;
import closure_4 from "_getSystemLocale" /* 1995 */;
import closure_5 from "fetchFingerprint" /* 1215 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function syncYYTextReplacementExperiment() {
if (obj.isIOS()) {
const NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
2026-07-29 08:29:29 +00:00
if (NSUserDefaultsBridge != null) {
const setShouldEnableYYTextReplacement = NSUserDefaultsBridge.setShouldEnableYYTextReplacement;
if (setShouldEnableYYTextReplacement != null) {
2026-08-24 06:08:38 +00:00
const result = setShouldEnableYYTextReplacement(shouldEnableYYTextReplacement.shouldEnableYYTextReplacement({ location: "NativeExperimentBridgeManager" }));
const tmpResult = shouldEnableYYTextReplacement;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
}
}
}
function updateIOSExperiments() {
2026-07-29 08:29:29 +00:00
if (obj.isIOS()) {
const NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
if (NSUserDefaultsBridge != null) {
const setShouldEnableYYTextReplacement = NSUserDefaultsBridge.setShouldEnableYYTextReplacement;
if (setShouldEnableYYTextReplacement != null) {
2026-09-02 09:53:35 +00:00
let tmpResult = tmp(17638);
2026-07-29 08:29:29 +00:00
const result = setShouldEnableYYTextReplacement(tmpResult.shouldEnableYYTextReplacement({ location: "NativeExperimentBridgeManager" }));
}
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const NSUserDefaultsBridge2 = NativeModules.NSUserDefaultsBridge;
if (NSUserDefaultsBridge2 != null) {
const setShouldFixPushNotificationRawPayload = NSUserDefaultsBridge2.setShouldFixPushNotificationRawPayload;
if (setShouldFixPushNotificationRawPayload != null) {
2026-09-02 09:53:35 +00:00
tmpResult = tmp(5227);
2026-07-29 08:29:29 +00:00
const result1 = setShouldFixPushNotificationRawPayload(tmpResult.isIOSPushNotificationRawPayloadFixExperimentEnabled());
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
obj = set2;
2026-07-29 08:29:29 +00:00
if (obj4.getConfig({ location: "NativeExperimentBridgeManager" }).enabled) {
const RNVVideo = tmp6.RNVVideo;
if (RNVVideo != null) {
const result2 = RNVVideo.setOptimizeConfigureAudio(true);
}
const RNVVideo2 = tmp6.RNVVideo;
if (RNVVideo2 != null) {
const result3 = RNVVideo2.setUseBackgroundProgressQueue(true);
2026-07-20 16:05:17 +00:00
}
}
}
function updateAndroidExperiments() {
2026-08-24 06:08:38 +00:00
let obj = { "X-Super-Properties": expandEventPropertiesDefault.getSuperPropertiesBase64(), "X-Fingerprint": store.getFingerprint(), "X-Installation-ID": store.getInstallationForTracking(), "X-Discord-Locale": locale.locale };
const obj2 = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
const obj3 = store;
2026-08-24 06:08:38 +00:00
const config = apexExperimentDefault.getConfig({ location: "NativeExperimentBridgeManager" });
2026-07-20 16:05:17 +00:00
const NativeCacheModule = NativeModules.NativeCacheModule;
2026-07-29 08:29:29 +00:00
if (NativeCacheModule != null) {
2026-07-20 16:05:17 +00:00
const _JSON = JSON;
2026-07-29 08:29:29 +00:00
obj = { headers: null, userId: null, enabled: null, apiBaseUrl: null, urlQueryParams: null, cooldownMs: null, debounceMs: null };
obj[0] = obj;
obj[1] = obj3.getId();
obj[2] = tmp3;
2026-08-24 06:08:38 +00:00
obj[3] = sendRequest.getAPIBaseURL();
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
obj[4] = "?limit=" + tmp4;
obj[5] = tmp5;
obj[6] = tmp6;
2026-07-20 16:05:17 +00:00
const result = NativeCacheModule.setItem("notificationNetworkRequest", JSON.stringify(obj));
2026-08-24 06:08:38 +00:00
const obj6 = sendRequest;
2026-07-29 08:29:29 +00:00
}
}
2026-08-24 06:08:38 +00:00
const NativeModules = get_ActivityIndicator.NativeModules;
initializeDefault;
2026-07-29 08:29:29 +00:00
let prototype = function NativeExperimentBridgeManager() {
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
2026-08-24 06:08:38 +00:00
let obj = set2;
2026-07-29 08:29:29 +00:00
if (obj.isIOS()) {
let tmp5 = updateIOSExperiments;
} else {
2026-08-24 06:08:38 +00:00
tmp5 = set2.isAndroid() ? updateAndroidExperiments : (() => {
2026-07-29 08:29:29 +00:00
});
2026-08-24 06:08:38 +00:00
const tmp3Result = set2;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
applyArgumentsResult.handleUpdate = tmp5;
obj = { APP_STATE_UPDATE: syncYYTextReplacementExperiment, POST_CONNECTION_OPEN: applyArgumentsResult.handleUpdate };
applyArgumentsResult.actions = obj;
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
prototype = new prototype();
2026-08-24 06:08:38 +00:00
let result = set.fileFinishedImporting("modules/chat/native/NativeExperimentBridgeManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default prototype;