Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
39 lines
1.6 KiB
TypeScript
39 lines
1.6 KiB
TypeScript
// Module ID: 7098
|
|
// Function ID: 7099
|
|
// Name: trackUserAvatarUpdated
|
|
// Dependencies: [1074, 7099, 1241, 1397, 2]
|
|
// Exports: trackUserAvatarUpdated
|
|
|
|
// Module 7098 (trackUserAvatarUpdated)
|
|
import Constants from "Constants" /* 1074 */;
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
|
|
import AvatarUtils from "AvatarUtils" /* 1397 */;
|
|
import ProfilePendingImageTypes from "ProfilePendingImageTypes" /* 7099 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const AnalyticEvents = Constants.AnalyticEvents;
|
|
const result = size.fileFinishedImporting("modules/user_profile/utils/trackUserAvatarUpdated.tsx");
|
|
|
|
export const trackUserAvatarUpdated = function trackUserAvatarUpdated(isGuildProfile) {
|
|
let flag = isGuildProfile.isGuildProfile;
|
|
({ avatarHash, avatarId } = isGuildProfile);
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
let NEW_ASSET = isGuildProfile.avatarAssetOrigin;
|
|
if (NEW_ASSET === undefined) {
|
|
NEW_ASSET = ProfilePendingImageTypes.AssetOriginTypes.NEW_ASSET;
|
|
}
|
|
const obj2 = { animated: null, is_guild_profile: null, recent_avatar_id: null, is_edited_recent_avatar: null };
|
|
const obj = AnalyticsUtilsDefault;
|
|
obj2.animated = AvatarUtils.isAnimatedIconHash(avatarHash);
|
|
obj2.is_guild_profile = flag;
|
|
let NumberResult;
|
|
if (NEW_ASSET === ProfilePendingImageTypes.AssetOriginTypes.ARCHIVED_ASSET) {
|
|
const _Number = Number;
|
|
NumberResult = Number(avatarId);
|
|
}
|
|
obj2.recent_avatar_id = NumberResult;
|
|
obj2.is_edited_recent_avatar = NEW_ASSET === ProfilePendingImageTypes.AssetOriginTypes.EDITED_ARCHIVED_ASSET;
|
|
obj.track(AnalyticEvents.USER_AVATAR_UPDATED, obj2);
|
|
};
|