decord/source/modules/activities/useIsActivityFocused.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

52 lines
2.2 KiB
TypeScript

// Module ID: 9618
// Function ID: 9619
// Name: useIsActivityFocused
// Dependencies: [4654, 1957, 9619, 504, 2]
// Exports: default, isActivityFocused
// Module 9618 (useIsActivityFocused)
import ChannelRTCParticipants from "ChannelRTCParticipants" /* 9619 */;
import ChannelRTCStore from "ChannelRTCStore" /* 4654 */;
import EmbeddedActivitiesStore from "EmbeddedActivitiesStore" /* 1957 */;
const require = globalThis.__r;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/activities/useIsActivityFocused.tsx");
export default function useIsActivityFocused(arg0) {
_require = arg0;
const items = [ChannelRTCStore, EmbeddedActivitiesStore];
return require("initialize").useStateFromStores(items, () => {
const selectedParticipant = ChannelRTCStore.getSelectedParticipant(closure_0);
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
let tmp3 = null != selectedParticipant && null != currentEmbeddedActivity;
if (tmp3) {
const obj2 = { applicationId: currentEmbeddedActivity.applicationId, instanceId: null };
let compositeInstanceId;
if (currentEmbeddedActivity != null) {
compositeInstanceId = currentEmbeddedActivity.compositeInstanceId;
}
obj2.instanceId = compositeInstanceId;
tmp3 = selectedParticipant.id === ChannelRTCParticipants.getEmbeddedActivityParticipantId(obj2);
}
return tmp3;
});
};
export const isActivityFocused = function isActivityFocused(channelId) {
({ ChannelRTCStore, EmbeddedActivitiesStore } = channelId);
const selectedParticipant = ChannelRTCStore.getSelectedParticipant(channelId.channelId);
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
let tmp3 = null != selectedParticipant && null != currentEmbeddedActivity;
if (tmp3) {
const obj2 = { applicationId: currentEmbeddedActivity.applicationId, instanceId: null };
let compositeInstanceId;
if (currentEmbeddedActivity != null) {
compositeInstanceId = currentEmbeddedActivity.compositeInstanceId;
}
obj2.instanceId = compositeInstanceId;
tmp3 = selectedParticipant.id === ChannelRTCParticipants.getEmbeddedActivityParticipantId(obj2);
}
return tmp3;
};