decord/source/modules/user_profile/utils/UserProfileStackedActivityCardUtils.tsx

65 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12523
// Function ID: 12524
2026-07-29 08:29:29 +00:00
// Name: getUserProfileLiveActivities
// Dependencies: [676, 12, 2]
2026-07-20 16:05:17 +00:00
// Exports: getUserProfileLiveActivities, getUserProfileStackedActivityCards
2026-08-25 06:04:03 +00:00
// Module 12523 (getUserProfileLiveActivities)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import apply from "apply" /* 12 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const ActivityTypes = ME.ActivityTypes;
const result = set.fileFinishedImporting("modules/user_profile/utils/UserProfileStackedActivityCardUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-08-14 17:33:39 +00:00
export const getUserProfileLiveActivities = function getUserProfileLiveActivities(stateFromStores1) {
2026-08-24 06:08:38 +00:00
return apply.uniqWith(stateFromStores1.filter((type) => {
2026-07-20 16:05:17 +00:00
type = type.type;
2026-07-29 08:29:29 +00:00
return type !== constants.CUSTOM_STATUS && type !== constants.HANG_STATUS;
2026-07-20 16:05:17 +00:00
}), (application_id, application_id2) => {
let tmp = null != application_id.application_id && null != application_id2.application_id && application_id.application_id === application_id2.application_id;
if (!tmp) {
tmp = null != application_id.name && null != application_id2.name && application_id.name === application_id2.name;
const tmp2 = null != application_id.name && null != application_id2.name && application_id.name === application_id2.name;
}
return tmp;
});
};
export const getUserProfileStackedActivityCards = function getUserProfileStackedActivityCards(arg0) {
({ stream, live } = arg0);
if (live === undefined) {
live = [];
}
({ voiceChannel, isPrivate, voiceActivity } = arg0);
if (isPrivate === undefined) {
isPrivate = false;
}
const items = [];
if (null != stream) {
2026-07-29 08:29:29 +00:00
let obj = { type: "stream", stream: null };
obj[1] = stream;
2026-07-20 16:05:17 +00:00
items.push(obj);
}
2026-07-29 08:29:29 +00:00
for (const item10015 of live) {
obj = { type: "live", activity: null };
obj[1] = item10015;
let arr = items.push(obj);
continue;
2026-07-20 16:05:17 +00:00
}
if (!isPrivate) {
isPrivate = null != stream;
}
if (!isPrivate) {
isPrivate = null != voiceActivity;
}
if (!isPrivate) {
isPrivate = null == voiceChannel;
}
if (!isPrivate) {
2026-07-29 08:29:29 +00:00
obj = { type: "voice", voiceChannel: null };
obj[1] = voiceChannel;
2026-07-20 16:05:17 +00:00
items.push(obj);
}
return items;
};