113 lines
4.2 KiB
TypeScript
113 lines
4.2 KiB
TypeScript
// Module ID: 8930
|
|
// Function ID: 8931
|
|
// Name: showUserProfileActionSheet
|
|
// Dependencies: [5, 5450, 4034, 1922, 2009, 4070, 8931, 4347, 8943, 2]
|
|
// Exports: getUserProfileActionSheetKey, getUserProfileBlockedSpeedBumpActionSheetKey, getUserProfileIgnoredSpeedBumpActionSheetKey, showUserProfileActionSheetPostConnection
|
|
|
|
// Module 8930 (showUserProfileActionSheet)
|
|
import asyncRequireImpl from "asyncRequireImpl" /* 2009 */;
|
|
import explicitContentFromProto from "explicitContentFromProto" /* 4070 */;
|
|
import ACTION_SHEET_HEIGHT_HALFDefault from "ACTION_SHEET_HEIGHT_HALF" /* 4347 */;
|
|
import closure_3 from "asyncGeneratorStep" /* 5 */;
|
|
import closure_5 from "markAllUserIdListsStale" /* 4034 */;
|
|
|
|
require = arg1;
|
|
function showUserProfileActionSheet(ignoreBlockedSpeedBump, arg1) {
|
|
const timestamp = Date.now();
|
|
const IgnoreProfileSpeedbumpDisabled = explicitContentFromProto.IgnoreProfileSpeedbumpDisabled;
|
|
if (!ignoreBlockedSpeedBump.ignoreBlockedSpeedBump) {
|
|
const isBlockedResult = closure_5.isBlocked(ignoreBlockedSpeedBump.userId);
|
|
const isIgnoredResult = closure_5.isIgnored(ignoreBlockedSpeedBump.userId);
|
|
if (isIgnoredResult) {
|
|
let obj = ACTION_SHEET_HEIGHT_HALFDefault;
|
|
const _HermesInternal = HermesInternal;
|
|
obj = {};
|
|
const combined = "UserProfileIgnoredSpeedBump" + ignoreBlockedSpeedBump.userId;
|
|
const merged = Object.assign(ignoreBlockedSpeedBump);
|
|
let str2 = "ignore";
|
|
if (isBlockedResult) {
|
|
str2 = "block";
|
|
}
|
|
obj.speedBumpType = str2;
|
|
obj.openedAt = timestamp;
|
|
obj.openLazy(tmp2(2009)(8931, tmp3.paths), combined, obj);
|
|
}
|
|
}
|
|
const tmp15 = asyncRequireImpl(8943, dependencyMap.paths);
|
|
const combined1 = "UserProfile" + ignoreBlockedSpeedBump.userId;
|
|
obj = {};
|
|
const merged1 = Object.assign(ignoreBlockedSpeedBump);
|
|
obj.openedAt = timestamp;
|
|
ACTION_SHEET_HEIGHT_HALFDefault.openLazy(tmp15, combined1, obj, "replaceAll");
|
|
}
|
|
require("processCallbacks").addPostConnectionCallback;
|
|
const result = require("set").fileFinishedImporting("modules/user_profile/native/showUserProfileActionSheet.tsx");
|
|
|
|
export default showUserProfileActionSheet;
|
|
export const getUserProfileActionSheetKey = function getUserProfileActionSheetKey(id) {
|
|
return "UserProfile" + id;
|
|
};
|
|
export const getUserProfileBlockedSpeedBumpActionSheetKey = function getUserProfileBlockedSpeedBumpActionSheetKey(arg0) {
|
|
return "UserProfileBlockedSpeedBump" + arg0;
|
|
};
|
|
export const getUserProfileIgnoredSpeedBumpActionSheetKey = function getUserProfileIgnoredSpeedBumpActionSheetKey(arg0) {
|
|
return "UserProfileIgnoredSpeedBump" + arg0;
|
|
};
|
|
export const showUserProfileActionSheetPostConnection = function showUserProfileActionSheetPostConnection(arg0) {
|
|
closure_0 = arg0;
|
|
addPostConnectionCallback(callback(function*() {
|
|
if (paths === 2) {
|
|
paths = 3;
|
|
HermesBuiltin.throwTypeError();
|
|
} else if (tmp3 === 3) {
|
|
if (arg0 === 1) {
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
let obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
return { value: "HermesInternal", done: "HermesInternal" };
|
|
}
|
|
} else {
|
|
try {
|
|
paths = 2;
|
|
if (0 === c1) {
|
|
if (arg0 === 1) {
|
|
paths = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
paths = 3;
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
const userId = tmp4;
|
|
c1 = 1;
|
|
paths = 1;
|
|
obj1 = { value: null, done: false };
|
|
obj1[0] = closure_1_0(paths[4])(paths[3], paths.paths);
|
|
return obj1;
|
|
}
|
|
} else if (arg0 === 1) {
|
|
paths = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
paths = 3;
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
if (null != _default.getUser(userId.userId)) {
|
|
closure_1_6(userId);
|
|
}
|
|
paths = 3;
|
|
return { value: "HermesInternal", done: "HermesInternal" };
|
|
}
|
|
} catch (tmp14) {
|
|
paths = tmp;
|
|
throw tmp14;
|
|
}
|
|
}
|
|
}));
|
|
};
|