decord/source/modules/user_profile/native/showUserProfileActionSheet.tsx

171 lines
6.1 KiB
TypeScript
Raw Normal View History

// Module ID: 8296
// Function ID: 8297
2026-07-29 08:29:29 +00:00
// Name: showUserProfileActionSheet
// Dependencies: [5, 5639, 4285, 3, 1371, 1896, 8297, 8298, 1935, 8299, 4603, 8317, 2]
2026-07-29 08:29:29 +00:00
// Exports: getUserProfileActionSheetKey, getUserProfileBlockedSpeedBumpActionSheetKey, getUserProfileIgnoredSpeedBumpActionSheetKey, showUserProfileActionSheetPostConnection
2026-07-20 16:05:17 +00:00
// Module 8296 (showUserProfileActionSheet)
import LoggerDefault from "Logger" /* 3 */;
import asyncRequireImpl from "asyncRequireImpl" /* 1896 */;
import UserSettings from "UserSettings" /* 1935 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4603 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import RelationshipStore from "RelationshipStore" /* 4285 */;
2026-07-23 10:11:24 +00:00
require = fn;
2026-07-29 08:29:29 +00:00
function showUserProfileActionSheet(ignoreBlockedSpeedBump, arg1) {
2026-08-26 06:04:24 +00:00
let str = arg1;
2026-07-20 16:05:17 +00:00
const timestamp = Date.now();
const IgnoreProfileSpeedbumpDisabled = UserSettings.IgnoreProfileSpeedbumpDisabled;
2026-07-29 08:29:29 +00:00
if (!ignoreBlockedSpeedBump.ignoreBlockedSpeedBump) {
const isBlockedResult = RelationshipStore.isBlocked(ignoreBlockedSpeedBump.userId);
const isIgnoredResult = RelationshipStore.isIgnored(ignoreBlockedSpeedBump.userId);
2026-07-20 16:05:17 +00:00
if (isIgnoredResult) {
const tmp8 = tmp2(1896)(8299, tmp3.paths);
const obj = ActionSheetActionCreatorsDefault;
2026-07-29 08:29:29 +00:00
const _HermesInternal = HermesInternal;
const combined = "UserProfileIgnoredSpeedBump" + ignoreBlockedSpeedBump.userId;
const obj2 = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(ignoreBlockedSpeedBump);
2026-08-26 06:04:24 +00:00
let str3 = "ignore";
2026-07-20 16:05:17 +00:00
if (isBlockedResult) {
2026-08-26 06:04:24 +00:00
str3 = "block";
2026-07-20 16:05:17 +00:00
}
obj2.speedBumpType = str3;
obj2.openedAt = timestamp;
obj.openLazy(tmp8, combined, obj2, str);
2026-07-20 16:05:17 +00:00
}
}
const tmp20 = asyncRequireImpl(8317, dependencyMap.paths);
2026-07-29 08:29:29 +00:00
const combined1 = "UserProfile" + ignoreBlockedSpeedBump.userId;
const obj4 = {};
2026-07-29 08:29:29 +00:00
const merged1 = Object.assign(ignoreBlockedSpeedBump);
obj4.openedAt = timestamp;
2026-08-26 06:04:24 +00:00
if (str == null) {
str = "replaceAll";
}
ActionSheetActionCreatorsDefault.openLazy(tmp20, combined1, obj4, str);
2026-07-20 16:05:17 +00:00
}
fn(5639).addPostConnectionCallback;
let closure_6 = new LoggerDefault("showUserProfileActionSheet");
const size = fn(2);
const result = size.fileFinishedImporting("modules/user_profile/native/showUserProfileActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default showUserProfileActionSheet;
2026-08-26 06:04:24 +00:00
export const getUserProfileActionSheetKey = function getUserProfileActionSheetKey(userId) {
return "UserProfile" + userId;
2026-07-29 08:29:29 +00:00
};
2026-07-20 16:05:17 +00:00
export const getUserProfileBlockedSpeedBumpActionSheetKey = function getUserProfileBlockedSpeedBumpActionSheetKey(arg0) {
return "UserProfileBlockedSpeedBump" + arg0;
};
2026-07-29 08:29:29 +00:00
export const getUserProfileIgnoredSpeedBumpActionSheetKey = function getUserProfileIgnoredSpeedBumpActionSheetKey(arg0) {
return "UserProfileIgnoredSpeedBump" + arg0;
};
2026-07-20 16:05:17 +00:00
export const showUserProfileActionSheetPostConnection = function showUserProfileActionSheetPostConnection(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
addPostConnectionCallback(asyncGeneratorStep(async (arg0, value) => {
if (c5 === 2) {
c5 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp6 === 3) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
2026-07-29 08:29:29 +00:00
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c5 = 2;
if (0 === c4) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
c5 = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
c5 = 3;
const obj3 = { value, done: true };
return obj3;
2026-07-29 08:29:29 +00:00
} else {
closure_1 = tmp3;
closure_0 = tmp7;
closure_128_0 = undefined;
let getUser;
c4 = 1;
c5 = 1;
const obj5 = { value: closure_0(tmp40[5])(tmp40[4], tmp40.paths), done: false };
return obj5;
2026-07-29 08:29:29 +00:00
}
} else {
if (1 === tmp7) {
if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 === 2) {
c5 = 3;
const obj6 = { value, done: true };
return obj6;
} else {
closure_128_0 = value.default;
if (null == closure_128_0.getUser(closure_129_0.userId)) {
if (obj4.getIsUserProfileLinkFetchEnabled("showUserProfileActionSheet")) {
c3 = 1;
c4 = 3;
c5 = 1;
const obj7 = { value: closure_0(tmp40[5])(tmp40[7], tmp40.paths), done: false };
return obj7;
}
obj4 = closure_0(tmp40[6]);
}
}
} else if (2 === tmp7) {
c3 = 0;
closure_128_2 = tmp40;
const _HermesInternal = HermesInternal;
logger.log("Failed to fetch user " + closure_129_0.userId + ":", closure_128_2);
} else if (3 === tmp7) {
if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 0;
c5 = 3;
const obj8 = { value, done: true };
return obj8;
} else {
getUser = value.getUser;
c4 = 4;
c5 = 1;
const obj9 = { value: getUser(closure_129_0.userId), done: false };
return obj9;
}
} else if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 0;
c5 = 3;
const obj = { value, done: true };
return obj;
} else {
c3 = 0;
}
if (null != closure_128_0.getUser(closure_129_0.userId)) {
showUserProfileActionSheet(closure_129_0);
2026-07-29 08:29:29 +00:00
}
c5 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp40) {
if (tmp4 === c3) {
c5 = tmp2;
throw tmp40;
} else {
c4 = tmp;
}
2026-07-29 08:29:29 +00:00
}
}
}));
2026-07-20 16:05:17 +00:00
};