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

38 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 8114
// Function ID: 8115
2026-07-20 16:05:17 +00:00
// Name: openUserProfileAvatarMediaViewer
2026-07-29 08:29:29 +00:00
// Dependencies: [4181, 676, 8115, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-29 08:29:29 +00:00
// Module 8114 (openUserProfileAvatarMediaViewer)
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
2026-07-23 10:11:24 +00:00
import { AVATAR_MAX_SIZE } from "ME";
const require = arg1;
const result = require("_openMediaModal").fileFinishedImporting("modules/user_profile/native/openUserProfileAvatarMediaViewer.tsx");
2026-07-20 16:05:17 +00:00
export default function openUserProfileAvatarMediaViewer(user) {
let guildId;
let originViewOrOriginLayout;
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);
if (typeof avatarURL !== "init") {
let obj = require(8115) /* _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
};