decord/source/modules/activity_status/getActivityStatusText.tsx

200 lines
5.6 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 9116
// Function ID: 71415
2026-07-20 16:05:17 +00:00
// Name: getActivityStatusText
2026-07-24 07:16:23 +00:00
// Dependencies: [653, 9117, 6981, 9118, 1212, 9119, 9120, 8359, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 9116 (getActivityStatusText)
2026-07-23 10:11:24 +00:00
import { ActivityTypes } from "ME";
const result = require("isEmbeddedActivity").fileFinishedImporting("modules/activity_status/getActivityStatusText.tsx");
2026-07-20 16:05:17 +00:00
export default function getActivityStatusText(name) {
let flag = arg1;
if (arg1 === undefined) {
flag = false;
}
name = undefined;
if (null != name) {
name = name.name;
}
let tmp2 = null;
if ("" !== name) {
let name1;
if (null != name) {
name1 = name.name;
}
tmp2 = name1;
}
let details;
if (null != name) {
details = name.details;
}
let tmp5 = null;
if ("" !== details) {
let details1;
if (null != name) {
details1 = name.details;
}
tmp5 = details1;
}
let state;
if (null != name) {
state = name.state;
}
let tmp8 = null;
if ("" !== state) {
let state1;
if (null != name) {
state1 = name.state;
}
tmp8 = state1;
}
let type;
if (null != name) {
type = name.type;
}
let tmp11 = tmp2;
if (type === ActivityTypes.STREAMING) {
tmp11 = tmp2;
if (null != tmp5) {
tmp11 = tmp5;
}
}
let status_display_type;
if (null != name) {
status_display_type = name.status_display_type;
}
2026-07-24 07:16:23 +00:00
if (status_display_type !== require(9117) /* StatusDisplayTypes */.StatusDisplayTypes.NAME) {
2026-07-20 16:05:17 +00:00
let status_display_type1;
if (null != name) {
status_display_type1 = name.status_display_type;
}
2026-07-24 07:16:23 +00:00
if (status_display_type1 !== require(9117) /* StatusDisplayTypes */.StatusDisplayTypes.STATE) {
2026-07-20 16:05:17 +00:00
let status_display_type2;
if (null != name) {
status_display_type2 = name.status_display_type;
}
let tmp13 = tmp11;
if (tmp20) {
tmp13 = tmp5;
}
2026-07-24 07:16:23 +00:00
tmp20 = status_display_type2 === require(9117) /* StatusDisplayTypes */.StatusDisplayTypes.DETAILS && null != tmp5;
2026-07-20 16:05:17 +00:00
} else {
tmp13 = tmp8;
}
} else {
tmp13 = tmp2;
}
2026-07-24 07:16:23 +00:00
if (importDefault(6981)(name)) {
const tmp56 = importDefault(9118)(tmp2);
2026-07-20 16:05:17 +00:00
let obj = { text: tmp56, tooltip: tmp56 };
return obj;
} else {
let type1;
if (null != name) {
type1 = name.type;
}
if (type1 === ActivityTypes.PLAYING) {
if (null != tmp13) {
obj = { text: tmp13 };
2026-07-23 10:11:24 +00:00
const intl8 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj1 = { game: tmp13 };
2026-07-23 10:11:24 +00:00
obj.tooltip = intl8.formatToPlainString(require(1212) /* getSystemLocale */.t.lFApmz, obj1);
2026-07-20 16:05:17 +00:00
return obj;
}
}
2026-07-24 07:16:23 +00:00
if (importDefault(9119)(name)) {
2026-07-20 16:05:17 +00:00
if (flag) {
if (null != tmp8) {
const parts = tmp8.split("; ");
let joined;
if (null != parts) {
joined = parts.join(", ");
}
const obj2 = { text: joined };
2026-07-23 10:11:24 +00:00
const intl7 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj3 = { name: joined };
2026-07-23 10:11:24 +00:00
obj2.tooltip = intl7.formatToPlainString(require(1212) /* getSystemLocale */.t.Vnuxue, obj3);
2026-07-20 16:05:17 +00:00
return obj2;
}
}
}
2026-07-24 07:16:23 +00:00
obj = require(9120) /* unpackStageChannelParty */;
2026-07-20 16:05:17 +00:00
if (obj.isStageActivity(name)) {
if (null != tmp2) {
const obj4 = { text: tmp2 };
2026-07-23 10:11:24 +00:00
const intl6 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj5 = { name: tmp2 };
2026-07-23 10:11:24 +00:00
obj4.tooltip = intl6.formatToPlainString(require(1212) /* getSystemLocale */.t.pW3Ip3, obj5);
2026-07-20 16:05:17 +00:00
let obj16 = obj4;
}
return obj16;
}
let type2;
if (null != name) {
type2 = name.type;
}
if (type2 === ActivityTypes.LISTENING) {
if (null != tmp13) {
const obj6 = { text: tmp13 };
2026-07-23 10:11:24 +00:00
const intl5 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj7 = { name: tmp13 };
2026-07-23 10:11:24 +00:00
obj6.tooltip = intl5.formatToPlainString(require(1212) /* getSystemLocale */.t.Vnuxue, obj7);
2026-07-20 16:05:17 +00:00
obj16 = obj6;
}
}
2026-07-24 07:16:23 +00:00
if (importDefault(8359)(name)) {
2026-07-20 16:05:17 +00:00
if (flag) {
if (null != tmp5) {
const obj8 = { text: tmp5 };
2026-07-23 10:11:24 +00:00
const intl4 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj9 = { name: tmp5 };
2026-07-23 10:11:24 +00:00
obj8.tooltip = intl4.formatToPlainString(require(1212) /* getSystemLocale */.t.pW3Ip3, obj9);
2026-07-20 16:05:17 +00:00
obj16 = obj8;
}
}
}
let type3;
if (null != name) {
type3 = name.type;
}
if (type3 === ActivityTypes.WATCHING) {
if (null != tmp13) {
const obj10 = { text: tmp13 };
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj11 = { name: tmp13 };
2026-07-23 10:11:24 +00:00
obj10.tooltip = intl3.formatToPlainString(require(1212) /* getSystemLocale */.t.pW3Ip3, obj11);
2026-07-20 16:05:17 +00:00
obj16 = obj10;
}
}
let type4;
if (null != name) {
type4 = name.type;
}
if (type4 === ActivityTypes.COMPETING) {
if (null != tmp13) {
const obj12 = { text: tmp13 };
2026-07-23 10:11:24 +00:00
const intl2 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj13 = { name: tmp13 };
2026-07-23 10:11:24 +00:00
obj12.tooltip = intl2.formatToPlainString(require(1212) /* getSystemLocale */.t.QQ2wVE, obj13);
2026-07-20 16:05:17 +00:00
obj16 = obj12;
}
}
let type5;
if (null != name) {
type5 = name.type;
}
if (type5 === ActivityTypes.STREAMING) {
if (null != tmp13) {
const obj14 = { text: tmp13 };
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj15 = { name: tmp13 };
2026-07-23 10:11:24 +00:00
obj14.tooltip = intl.formatToPlainString(require(1212) /* getSystemLocale */.t["0wJXSh"], obj15);
2026-07-20 16:05:17 +00:00
obj16 = obj14;
}
}
obj16 = {};
}
};