2026-08-25 06:04:03 +00:00
|
|
|
// Module ID: 12487
|
|
|
|
|
// Function ID: 12488
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: TimestampBadge
|
2026-08-25 06:04:03 +00:00
|
|
|
// Dependencies: [19, 17, 676, 21, 4380, 11580, 7343, 7835, 9794, 9799, 8909, 12488, 12489, 712, 12490, 8393, 4919, 4376, 11201, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: EpisodeBadge, PartyBadge, TimestampBadge
|
|
|
|
|
|
2026-08-25 06:04:03 +00:00
|
|
|
// Module 12487 (TimestampBadge)
|
2026-08-24 06:08:38 +00:00
|
|
|
import noopAll from "noop" /* 19 */;
|
|
|
|
|
import ThemesDefault from "Themes" /* 712 */;
|
2026-08-25 06:04:03 +00:00
|
|
|
import isEmbeddedActivityDefault from "isEmbeddedActivity" /* 7343 */;
|
|
|
|
|
import calculateTimestampDurations from "calculateTimestampDurations" /* 8393 */;
|
|
|
|
|
import useTimestampTickedNow from "useTimestampTickedNow" /* 12488 */;
|
|
|
|
|
import shouldShowActivityTimeBarDefault from "shouldShowActivityTimeBar" /* 12489 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
import { View } from "get ActivityIndicator" /* 17 */;
|
|
|
|
|
import { ActivityTypes } from "ME" /* 676 */;
|
|
|
|
|
import jsxProd from "jsxProd" /* 21 */;
|
2026-08-25 06:04:03 +00:00
|
|
|
import createCacheKey from "createCacheKey" /* 4380 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
require = arg1;
|
|
|
|
|
noopAll;
|
2026-07-29 08:29:29 +00:00
|
|
|
({ jsx: c5, jsxs: closure_6 } = jsxProd);
|
|
|
|
|
let closure_7 = createCacheKey.createStyles({ container: { display: "flex", flexDirection: "row", alignItems: "center", gap: 4 }, bold: { fontWeight: "bold" } });
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileActivityBadges.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const TimestampBadge = function TimestampBadge(activity) {
|
|
|
|
|
activity = activity.activity;
|
|
|
|
|
const tmp = callback3();
|
2026-08-24 06:08:38 +00:00
|
|
|
let obj = useTimestampTickedNow;
|
2026-07-20 16:05:17 +00:00
|
|
|
const timestamps = activity.timestamps;
|
|
|
|
|
let start;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (timestamps != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
start = timestamps.start;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (start == null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
start = activity.created_at;
|
|
|
|
|
}
|
|
|
|
|
if (null != start) {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (!shouldShowActivityTimeBarDefault(activity)) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const timestamps2 = activity.timestamps;
|
|
|
|
|
let end;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (timestamps2 != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
end = timestamps2.end;
|
|
|
|
|
}
|
|
|
|
|
const timestamps3 = activity.timestamps;
|
2026-07-29 08:29:29 +00:00
|
|
|
let flag;
|
|
|
|
|
if (timestamps3 != null) {
|
|
|
|
|
flag = timestamps3.isCountDown;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (flag == null) {
|
|
|
|
|
flag = false;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
let flag2 = flag;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (flag) {
|
2026-07-29 08:29:29 +00:00
|
|
|
flag2 = null != end;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (flag2) {
|
|
|
|
|
flag2 = end > obj.useTimestampTickedNow().now;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (flag2 === undefined) {
|
|
|
|
|
flag2 = false;
|
|
|
|
|
}
|
|
|
|
|
if (flag2) {
|
2026-08-25 06:04:03 +00:00
|
|
|
let GameControllerIcon = tmp2(11580).HourglassIcon;
|
|
|
|
|
} else if (tmp10(7343)(activity)) {
|
|
|
|
|
GameControllerIcon = tmp2(7835).AppsIcon;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else if (activity.type === ActivityTypes.WATCHING) {
|
2026-08-25 06:04:03 +00:00
|
|
|
GameControllerIcon = tmp2(9794).TvIcon;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else if (activity.type === tmp6.LISTENING) {
|
2026-08-25 06:04:03 +00:00
|
|
|
GameControllerIcon = tmp2(9799).MusicIcon;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-08-25 06:04:03 +00:00
|
|
|
GameControllerIcon = tmp2(8909).GameControllerIcon;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { style: null, children: null };
|
|
|
|
|
obj[0] = tmp.container;
|
|
|
|
|
obj = { size: "xxs", color: null };
|
|
|
|
|
obj[1] = tmp10(712).colors.TEXT_FEEDBACK_POSITIVE;
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [callback(GameControllerIcon, obj), ];
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1 = { entry: null, style: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj2 = { start: null, end: null, isCountDown: null };
|
|
|
|
|
obj2[0] = start;
|
|
|
|
|
obj2[1] = end;
|
|
|
|
|
obj2[2] = flag;
|
|
|
|
|
obj1[0] = obj2;
|
|
|
|
|
obj1[1] = tmp.bold;
|
2026-08-25 06:04:03 +00:00
|
|
|
items[1] = callback(tmp2(12490).ActiveTimestamp, obj1);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = items;
|
2026-07-20 16:05:17 +00:00
|
|
|
return callback2(View, obj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
};
|
|
|
|
|
export const PartyBadge = function PartyBadge(activity) {
|
|
|
|
|
activity = activity.activity;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (!isEmbeddedActivityDefault(activity)) {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != activity.party) {
|
2026-08-24 06:08:38 +00:00
|
|
|
const richGameStateBadgeText = calculateTimestampDurations.getRichGameStateBadgeText(activity.state, activity.party);
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp8 = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != richGameStateBadgeText) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj = { style: null, children: null };
|
|
|
|
|
obj[0] = tmp.container;
|
|
|
|
|
obj = { size: "xxs", color: null };
|
2026-08-24 06:08:38 +00:00
|
|
|
obj[1] = ThemesDefault.colors.TEXT_MUTED;
|
2026-08-25 06:04:03 +00:00
|
|
|
const items = [callback(tmp9(4919).GroupIcon, obj), ];
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { variant: "text-sm/medium", color: "text-muted", children: null };
|
|
|
|
|
obj[2] = richGameStateBadgeText;
|
2026-08-25 06:04:03 +00:00
|
|
|
items[1] = callback(tmp9(4376).Text, obj);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = items;
|
|
|
|
|
tmp8 = callback2(View, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp8;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
};
|
|
|
|
|
export const EpisodeBadge = function EpisodeBadge(activity) {
|
2026-08-24 06:08:38 +00:00
|
|
|
let obj = calculateTimestampDurations;
|
2026-07-20 16:05:17 +00:00
|
|
|
const assets = activity.activity.assets;
|
|
|
|
|
let large_text;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (assets != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
large_text = assets.large_text;
|
|
|
|
|
}
|
|
|
|
|
const episodeBadgeText = obj.getEpisodeBadgeText(large_text);
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp6 = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != episodeBadgeText) {
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { style: null, children: null };
|
|
|
|
|
obj[0] = tmp.container;
|
|
|
|
|
obj = { size: "xxs", color: null };
|
2026-08-24 06:08:38 +00:00
|
|
|
obj[1] = ThemesDefault.colors.TEXT_MUTED;
|
2026-08-25 06:04:03 +00:00
|
|
|
const items = [callback(tmp2(11201).TopicsIcon, obj), ];
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1 = { variant: "text-sm/medium", color: "text-muted", children: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
obj1[2] = episodeBadgeText;
|
2026-08-25 06:04:03 +00:00
|
|
|
items[1] = callback(tmp2(4376).Text, obj1);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = items;
|
|
|
|
|
tmp6 = callback2(View, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp6;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|