decord/source/modules/profile_customization/native/ProfileCustomizationUtils.tsx

57 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 8333
// Function ID: 8334
// Name: profile_customization/ProfileCustomizationUtils
// Dependencies: [1396, 8334, 1091, 2]
2026-08-11 06:20:06 +00:00
// Exports: getAvatarSource, useUserProfileBannerBackgroundColor
2026-07-20 16:05:17 +00:00
// Module 8333 (profile_customization/ProfileCustomizationUtils)
import utils_ColorUtils from "utils/ColorUtils" /* 1091 */;
import AvatarUtils from "AvatarUtils" /* 1396 */;
import VideoBackground from "VideoBackground" /* 8334 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("modules/profile_customization/native/ProfileCustomizationUtils.tsx");
2026-07-20 16:05:17 +00:00
export const useUserProfileBannerBackgroundColor = function useUserProfileBannerBackgroundColor(arg0) {
({ user, pendingAvatarSrc, displayProfile } = arg0);
if (null == user) {
const memoizedImageSourceResult = VideoBackground.memoizedImageSource(null);
2026-07-20 16:05:17 +00:00
let primaryColor;
2026-07-29 08:29:29 +00:00
if (displayProfile != null) {
2026-07-20 16:05:17 +00:00
primaryColor = displayProfile.primaryColor;
}
2026-07-29 08:29:29 +00:00
if (primaryColor == null) {
primaryColor = rgb2intResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return primaryColor;
2026-07-20 16:05:17 +00:00
} else if (null == pendingAvatarSrc) {
pendingAvatarSrc = user.getAvatarURL(tmp, 80);
2026-07-29 08:29:29 +00:00
} else if (pendingAvatarSrc == null) {
const obj2 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(user);
obj2.avatar = null;
pendingAvatarSrc = AvatarUtils.getUserAvatarURL(obj2);
2026-07-20 16:05:17 +00:00
}
};
export const getAvatarSource = function getAvatarSource(getAvatarURL, arg1, arg2, arg3) {
2026-07-29 08:29:29 +00:00
if (null == getAvatarURL) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-29 08:29:29 +00:00
let userAvatarURL = arg2;
if (undefined === arg2) {
let memoizedImageSourceResult = VideoBackground.memoizedImageSource(getAvatarURL.getAvatarURL(arg1, 80, !arg3));
2026-07-29 08:29:29 +00:00
const tmp2 = !arg3;
} else {
if (userAvatarURL == null) {
const obj2 = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(getAvatarURL);
obj2.avatar = null;
userAvatarURL = tmp3(1396).getUserAvatarURL(obj2);
const tmp3Result = tmp3(1396);
2026-07-29 08:29:29 +00:00
}
memoizedImageSourceResult = VideoBackground.memoizedImageSource(userAvatarURL);
2026-07-29 08:29:29 +00:00
tmp3 = require;
2026-07-20 16:05:17 +00:00
}
}
};