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

31 lines
1.1 KiB
TypeScript

// Module ID: 9731
// Function ID: 9732
// Name: useIsViewingActivity
// Dependencies: [4738, 9713, 4579, 9704, 504, 2]
// Exports: useIsViewingActivity
// Module 9731 (useIsViewingActivity)
import ChannelCallModalDefault from "ChannelCallModal" /* 9704 */;
import useIsActivityFocusedDefault from "useIsActivityFocused" /* 9713 */;
import ChannelRTCStore from "ChannelRTCStore" /* 4738 */;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/activities/native/useIsViewingActivity.tsx");
export const useIsViewingActivity = function useIsViewingActivity(channelId) {
channelId = channelId.channelId;
let tmp = useIsActivityFocusedDefault(channelId);
const isModalOpen = channelId(4579).useIsModalOpen(ChannelCallModalDefault);
const obj = channelId(4579);
const items = [ChannelRTCStore];
const items1 = [channelId];
const stateFromStores = channelId(504).useStateFromStores(items, () => ChannelRTCStore.getChatOpen(channelId), items1);
if (tmp) {
tmp = isModalOpen;
}
if (tmp) {
tmp = !stateFromStores;
}
return tmp;
};