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

34 lines
1.4 KiB
TypeScript
Raw Normal View History

// Module ID: 8346
// Function ID: 8347
2026-07-20 16:05:17 +00:00
// Name: openUserProfileAvatarMediaViewer
// Dependencies: [4599, 1074, 8347, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 8346 (openUserProfileAvatarMediaViewer)
import openMediaModal from "openMediaModal" /* 8347 */;
import AccessibilityStore from "AccessibilityStore" /* 4599 */;
2026-07-23 10:11:24 +00:00
require = fn;
const AVATAR_MAX_SIZE = fn(1074).AVATAR_MAX_SIZE;
let size = fn(2);
const result = size.fileFinishedImporting("modules/user_profile/native/openUserProfileAvatarMediaViewer.tsx");
2026-07-20 16:05:17 +00:00
export default function openUserProfileAvatarMediaViewer(user) {
user = user.user;
const useReducedMotion = AccessibilityStore.useReducedMotion;
2026-07-29 08:29:29 +00:00
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") {
const obj2 = { initialSources: null, originViewOrOriginLayout: null, analyticsSource: "user_profile_avatar", openAs: "action-sheet", shareable: false, disableDownload: true, disableMediaOverlayButton: true, disableMediaOverlayFooter: true };
const size = { uri: avatarURL, mediaIndex: 0, height: tmp, width: tmp, accessoryType: "embed" };
const items = [size];
obj2.initialSources = items;
obj2.originViewOrOriginLayout = originViewOrOriginLayout;
openMediaModal.openMediaModal(obj2);
2026-07-27 11:26:19 +00:00
}
2026-07-20 16:05:17 +00:00
};