decord/source/utils/NicknameUtils.tsx

76 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 4444
// Function ID: 4445
2026-07-20 16:05:17 +00:00
// Name: getNickname
2026-08-05 07:35:12 +00:00
// Dependencies: [1372, 1942, 3892, 1236, 4094, 589, 2]
2026-07-29 08:29:29 +00:00
// Exports: getNickname, useName
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
// Module 4444 (getNickname)
2026-07-29 08:29:29 +00:00
import ensureGuildLoaded from "ensureGuildLoaded";
import trackCommunicationDisabled from "trackCommunicationDisabled";
import upsertRelationship from "upsertRelationship";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
function getNickname(id, arg1, id) {
if (null == id) {
2026-07-20 16:05:17 +00:00
return null;
} else if (null != id) {
2026-07-29 08:29:29 +00:00
return store2.getNick(id, id.id);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (null != arg1) {
const channel = store.getChannel(arg1);
let isPrivateResult;
if (channel != null) {
isPrivateResult = channel.isPrivate();
}
if (isPrivateResult) {
return store3.getNickname(id.id);
2026-07-20 16:05:17 +00:00
}
}
return null;
}
}
2026-07-29 08:29:29 +00:00
function getName(id, arg1, id) {
if (null == id) {
const intl = require(1236) /* getSystemLocale */.intl;
let stringResult = intl.string(require(1236) /* getSystemLocale */.t.sKdZ6U);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
stringResult = null;
if (null != id) {
if (null != id) {
stringResult = store2.getNick(id, id.id);
} else {
stringResult = null;
if (null != arg1) {
const channel = store.getChannel(arg1);
let isPrivateResult;
if (channel != null) {
isPrivateResult = channel.isPrivate();
}
stringResult = null;
if (isPrivateResult) {
stringResult = store3.getNickname(id.id);
}
}
}
}
if (stringResult == null) {
2026-08-05 07:35:12 +00:00
stringResult = importDefault(4094).getName(id);
const obj2 = importDefault(4094);
2026-07-20 16:05:17 +00:00
}
}
return stringResult;
}
function useName(arg0, arg1, arg2) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
let closure_1 = arg1;
2026-07-20 16:05:17 +00:00
const dependencyMap = arg2;
2026-07-29 08:29:29 +00:00
const items = [trackCommunicationDisabled, ensureGuildLoaded, upsertRelationship];
return _require(589).useStateFromStores(items, () => outer1_6(closure_0, closure_1, closure_2));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const result = require("upsertRelationship").fileFinishedImporting("utils/NicknameUtils.tsx");
2026-07-20 16:05:17 +00:00
export default { getNickname, getName, useName };
export { getNickname };
export { getName };
export { useName };