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

37 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8990
// Function ID: 8991
2026-07-20 16:05:17 +00:00
// Name: openUserProfileAvatarMediaViewer
2026-08-25 06:04:03 +00:00
// Dependencies: [4372, 676, 8991, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 8990 (openUserProfileAvatarMediaViewer)
import _openMediaModal from "_openMediaModal" /* 8991 */;
import closure_2 from "maybeApplyNoTextColorForLightCustomTheme" /* 4372 */;
2026-08-24 06:08:38 +00:00
import { AVATAR_MAX_SIZE } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/user_profile/native/openUserProfileAvatarMediaViewer.tsx");
2026-07-20 16:05:17 +00:00
export default function openUserProfileAvatarMediaViewer(user) {
user = user.user;
2026-07-29 08:29:29 +00:00
useReducedMotion = useReducedMotion.useReducedMotion;
let animate = !useReducedMotion;
2026-07-24 07:16:23 +00:00
({ guildId, originViewOrOriginLayout } = user);
2026-07-29 08:29:29 +00:00
if (!useReducedMotion) {
2026-07-20 16:05:17 +00:00
animate = user.animate;
}
2026-07-29 08:29:29 +00:00
const avatarURL = user.getAvatarURL(guildId, tmp, animate);
2026-08-04 21:03:28 +00:00
if (typeof avatarURL === "string") {
2026-08-24 06:08:38 +00:00
let obj = _openMediaModal;
2026-07-27 11:26:19 +00:00
obj = { initialSources: null, originViewOrOriginLayout: null, analyticsSource: "user_profile_avatar", openAs: "action-sheet", shareable: false, disableDownload: true, disableMediaOverlayButton: true, disableMediaOverlayFooter: true };
2026-07-29 08:29:29 +00:00
obj = { uri: null, mediaIndex: 0, height: null, width: null, accessoryType: "embed" };
obj[0] = avatarURL;
obj[2] = tmp;
obj[3] = tmp;
2026-07-27 11:26:19 +00:00
const items = [obj];
2026-07-29 08:29:29 +00:00
obj[0] = items;
obj[1] = originViewOrOriginLayout;
2026-07-27 11:26:19 +00:00
obj.openMediaModal(obj);
}
2026-07-20 16:05:17 +00:00
};