105 lines
4.5 KiB
TypeScript
105 lines
4.5 KiB
TypeScript
// Module ID: 17131
|
|
// Function ID: 17132
|
|
// Name: syncYYTextReplacementExperiment
|
|
// Dependencies: [17, 1995, 1218, 500, 17132, 5004, 17133, 698, 17134, 530, 5043, 2]
|
|
|
|
// Module 17131 (syncYYTextReplacementExperiment)
|
|
import set from "set" /* 2 */;
|
|
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
|
|
import set2 from "set" /* 500 */;
|
|
import sendRequest from "sendRequest" /* 530 */;
|
|
import expandEventPropertiesDefault from "expandEventProperties" /* 698 */;
|
|
import initializeDefault from "initialize" /* 5043 */;
|
|
import shouldEnableYYTextReplacement from "shouldEnableYYTextReplacement" /* 17132 */;
|
|
import apexExperimentDefault from "apexExperiment" /* 17134 */;
|
|
import closure_4 from "_getSystemLocale" /* 1995 */;
|
|
import closure_5 from "fetchFingerprint" /* 1218 */;
|
|
|
|
function syncYYTextReplacementExperiment() {
|
|
if (obj.isIOS()) {
|
|
const NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
|
|
if (NSUserDefaultsBridge != null) {
|
|
const setShouldEnableYYTextReplacement = NSUserDefaultsBridge.setShouldEnableYYTextReplacement;
|
|
if (setShouldEnableYYTextReplacement != null) {
|
|
const result = setShouldEnableYYTextReplacement(shouldEnableYYTextReplacement.shouldEnableYYTextReplacement({ location: "NativeExperimentBridgeManager" }));
|
|
const tmpResult = shouldEnableYYTextReplacement;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateIOSExperiments() {
|
|
if (obj.isIOS()) {
|
|
const NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
|
|
if (NSUserDefaultsBridge != null) {
|
|
const setShouldEnableYYTextReplacement = NSUserDefaultsBridge.setShouldEnableYYTextReplacement;
|
|
if (setShouldEnableYYTextReplacement != null) {
|
|
let tmpResult = tmp(17132);
|
|
const result = setShouldEnableYYTextReplacement(tmpResult.shouldEnableYYTextReplacement({ location: "NativeExperimentBridgeManager" }));
|
|
}
|
|
}
|
|
}
|
|
const NSUserDefaultsBridge2 = NativeModules.NSUserDefaultsBridge;
|
|
if (NSUserDefaultsBridge2 != null) {
|
|
const setShouldFixPushNotificationRawPayload = NSUserDefaultsBridge2.setShouldFixPushNotificationRawPayload;
|
|
if (setShouldFixPushNotificationRawPayload != null) {
|
|
tmpResult = tmp(5004);
|
|
const result1 = setShouldFixPushNotificationRawPayload(tmpResult.isIOSPushNotificationRawPayloadFixExperimentEnabled());
|
|
}
|
|
}
|
|
obj = set2;
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
function updateAndroidExperiments() {
|
|
let obj = { "X-Super-Properties": expandEventPropertiesDefault.getSuperPropertiesBase64(), "X-Fingerprint": store.getFingerprint(), "X-Installation-ID": store.getInstallationForTracking(), "X-Discord-Locale": locale.locale };
|
|
const obj2 = expandEventPropertiesDefault;
|
|
const obj3 = store;
|
|
const config = apexExperimentDefault.getConfig({ location: "NativeExperimentBridgeManager" });
|
|
const NativeCacheModule = NativeModules.NativeCacheModule;
|
|
if (NativeCacheModule != null) {
|
|
const _JSON = JSON;
|
|
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;
|
|
obj[3] = sendRequest.getAPIBaseURL();
|
|
const _HermesInternal = HermesInternal;
|
|
obj[4] = "?limit=" + tmp4;
|
|
obj[5] = tmp5;
|
|
obj[6] = tmp6;
|
|
const result = NativeCacheModule.setItem("notificationNetworkRequest", JSON.stringify(obj));
|
|
const obj6 = sendRequest;
|
|
}
|
|
}
|
|
const NativeModules = get_ActivityIndicator.NativeModules;
|
|
initializeDefault;
|
|
let prototype = function NativeExperimentBridgeManager() {
|
|
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
let obj = set2;
|
|
if (obj.isIOS()) {
|
|
let tmp5 = updateIOSExperiments;
|
|
} else {
|
|
tmp5 = set2.isAndroid() ? updateAndroidExperiments : (() => {
|
|
|
|
});
|
|
const tmp3Result = set2;
|
|
}
|
|
applyArgumentsResult.handleUpdate = tmp5;
|
|
obj = { APP_STATE_UPDATE: syncYYTextReplacementExperiment, POST_CONNECTION_OPEN: applyArgumentsResult.handleUpdate };
|
|
applyArgumentsResult.actions = obj;
|
|
return applyArgumentsResult;
|
|
}.prototype;
|
|
class prototype extends tmp2 {
|
|
}
|
|
prototype = new prototype();
|
|
let result = set.fileFinishedImporting("modules/chat/native/NativeExperimentBridgeManager.tsx");
|
|
|
|
export default prototype;
|