decord/alpha/source/modules/activities/native/useIsViewingActivity.tsx

74 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 10828
// Function ID: 10829
2026-07-20 16:05:17 +00:00
// Name: useIsViewingActivity
2026-10-09 10:00:15 +00:00
// Dependencies: [6043, 558, 576, 10818, 4937, 10815, 504, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 10828 (useIsViewingActivity)
import ChannelCallModalDefault from "ChannelCallModal" /* 10815 */;
import useIsActivityFocusedDefault from "useIsActivityFocused" /* 10818 */;
import ChannelRTCStore from "ChannelRTCStore" /* 6043 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsViewingActivity(channelId) {
2026-10-03 08:58:59 +00:00
let first;
let tmp8;
let tmp9;
const obj = channelId(576);
const cResult = obj.c(4);
const tmp = channelId;
channelId = channelId.channelId;
let tmp4 = useIsActivityFocusedDefault(channelId);
2026-10-09 10:00:15 +00:00
const obj2 = channelId(4937);
2026-10-03 08:58:59 +00:00
const isModalOpen = obj2.useIsModalOpen(ChannelCallModalDefault);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [ChannelRTCStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== channelId) {
2026-10-08 09:57:35 +00:00
const fn = function c() {
2026-10-03 08:58:59 +00:00
return ChannelRTCStore.getChatOpen(channelId);
};
const items1 = [channelId];
cResult[1] = channelId;
cResult[2] = fn;
cResult[3] = items1;
tmp9 = items1;
tmp8 = fn;
} else {
tmp8 = cResult[2];
tmp9 = cResult[3];
}
const tmpResult = tmp(504);
const stateFromStores = tmpResult.useStateFromStores(first, tmp8, tmp9);
if (tmp4) {
tmp4 = isModalOpen;
}
if (tmp4) {
tmp4 = !stateFromStores;
}
return tmp4;
2026-10-08 09:57:35 +00:00
}) : (function useIsViewingActivity(channelId) {
2026-07-20 16:05:17 +00:00
channelId = channelId.channelId;
2026-08-24 06:08:38 +00:00
let tmp = useIsActivityFocusedDefault(channelId);
2026-10-09 10:00:15 +00:00
const obj = channelId(4937);
2026-10-03 08:58:59 +00:00
const isModalOpen = obj.useIsModalOpen(ChannelCallModalDefault);
const items = [ChannelRTCStore];
2026-07-20 16:05:17 +00:00
const items1 = [channelId];
2026-10-03 08:58:59 +00:00
const obj2 = channelId(504);
const stateFromStores = obj2.useStateFromStores(items, () => ChannelRTCStore.getChatOpen(channelId), items1);
2026-07-20 16:05:17 +00:00
if (tmp) {
tmp = isModalOpen;
}
if (tmp) {
tmp = !stateFromStores;
}
return tmp;
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/activities/native/useIsViewingActivity.tsx");
export const useIsViewingActivity = tmp2;