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

76 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-06 22:12:49 +00:00
// Module ID: 8846
// Function ID: 8847
// Name: useIsViewingActivity
2026-10-06 22:12:49 +00:00
// Dependencies: [4853, 558, 576, 8833, 4694, 8830, 504, 2]
2026-10-06 22:12:49 +00:00
// Module 8846 (useIsViewingActivity)
import ChannelCallModalDefault from "ChannelCallModal" /* 8830 */;
import useIsActivityFocusedDefault from "useIsActivityFocused" /* 8833 */;
import ChannelRTCStore from "ChannelRTCStore" /* 4853 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-10-06 22:12:49 +00:00
let channelId;
2026-10-06 22:12:49 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? ((channelId) => {
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);
const obj2 = channelId(4694);
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) {
const fn = function o() {
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;
}) : ((channelId) => {
channelId = channelId.channelId;
let tmp = useIsActivityFocusedDefault(channelId);
2026-10-06 22:12:49 +00:00
const obj = channelId(4694);
const isModalOpen = obj.useIsModalOpen(ChannelCallModalDefault);
const items = [ChannelRTCStore];
const items1 = [channelId];
2026-10-06 22:12:49 +00:00
const obj2 = channelId(504);
const stateFromStores = obj2.useStateFromStores(items, () => ChannelRTCStore.getChatOpen(channelId), items1);
if (tmp) {
tmp = isModalOpen;
}
if (tmp) {
tmp = !stateFromStores;
}
return tmp;
2026-10-06 22:12:49 +00:00
});
const result = size.fileFinishedImporting("modules/activities/native/useIsViewingActivity.tsx");
export const useIsViewingActivity = tmp2;