decord/beta/source/modules/chat/native/ChatViewPopups.tsx

67 lines
2.1 KiB
TypeScript
Raw Normal View History

// Module ID: 12145
// Function ID: 12146
// Name: ChatViewPopups
// Dependencies: [19, 12146, 12150, 12158, 2]
// Module 12145 (ChatViewPopups)
import useIsHubRealNamePromptShowingDefault from "useIsHubRealNamePromptShowing" /* 12146 */;
import WelcomeScreenUtils from "WelcomeScreenUtils" /* 12150 */;
import GuildDirectoryNicknameUpsellModalActionCreatorsDefault from "GuildDirectoryNicknameUpsellModalActionCreators" /* 12158 */;
2026-10-01 14:13:23 +00:00
import react from "react" /* 19 */;
import size from "module_2" /* 2 */;
let dependencyMap, importDefault;
class ChatViewPopups {
2026-10-01 14:13:23 +00:00
constructor(guildId) {
let closure_2;
let ref;
guildId = guildId.guildId;
let showWelcomeModal;
const channelId = guildId.channelId;
importDefault = showWelcomeModal.useRef(false);
const tmp = useIsHubRealNamePromptShowingDefault(guildId);
dependencyMap = tmp;
let obj = guildId(12150);
showWelcomeModal = obj.useShowWelcomeModal(guildId, channelId);
const items = [guildId, showWelcomeModal, tmp];
const effect = showWelcomeModal.useEffect(() => {
if (!ref.current) {
2026-10-01 14:13:23 +00:00
const tmp2 = closure_2;
if (tmp2) {
const obj2 = {
guildId,
onHide() {
ref.current = false;
return false;
}
};
2026-10-01 14:13:23 +00:00
const obj3 = GuildDirectoryNicknameUpsellModalActionCreatorsDefault;
obj3.open(obj2);
ref.current = true;
} else {
const tmp3 = showWelcomeModal;
if (tmp3) {
const obj4 = {
guildId,
onHide() {
ref.current = false;
return false;
}
};
const obj = WelcomeScreenUtils;
const result = obj.openWelcomeActionSheet(obj4);
ref.current = true;
}
}
}
}, items);
return null;
}
}
2026-10-01 14:13:23 +00:00
const memoResult = react.memo(ChatViewPopups);
let result = size.fileFinishedImporting("modules/chat/native/ChatViewPopups.tsx");
2026-10-01 14:13:23 +00:00
export default memoResult;
export { ChatViewPopups };