mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 21:47:47 +00:00
* feat(prejoin) created native Prejoin screen * feat(prejoin) fixed useState callback and updates warnings * feat(prejoin) created styles file * feat(prejoin) moved nav from middleware to appNavigate, created native DeviceStatus * feat(prejoin) updated styles * feat(prejoin) review remarks pt. 1 * feat(prejoin) removed unused styles * feat(prejoin) review remarks pt. 2 * feat(prejoin) comment fix * feat(prejoin) added header title * feat(prejoin) review remarks * feat(lobby) updated styles * feat(prejoin) updated lobby screen header button functionality * feat(prejoin) review remarks pt 3 * feat(welcome) removed VideoSwitch component * feat(mobile/navigation) fixed linter * feat(welcome) moved isWelcomePageEnabled to functions.ts * feat(mobile/navigation) screen options and order updates * feat(app) review remark * feat(welcome) added translation for screen header title and fixed build * feat(mobile/navigation) added screen title translation and created screen option * feat(mobile/navigation) fixed screenOptions import * feat(mobile/navigation) added DialInSummary title translation, fixed animation and close button * feat(welcome) fixed build * feat(welcome) removed extra check * feat(prejoin) review remarks pt 4 * feat(prejoin) added Join in low bandwidth mode btn * feat(welcome) changed welcome screen header title * fixup lobby close
37 lines
1.2 KiB
JavaScript
37 lines
1.2 KiB
JavaScript
// @flow
|
|
|
|
import debounce from 'lodash/debounce';
|
|
import { NativeModules } from 'react-native';
|
|
|
|
import { getAppProp } from '../../base/app';
|
|
import { readyToClose } from '../external-api/actions';
|
|
|
|
|
|
/**
|
|
* Sends a specific event to the native counterpart of the External API. Native
|
|
* apps may listen to such events via the mechanisms provided by the (native)
|
|
* mobile Jitsi Meet SDK.
|
|
*
|
|
* @param {Object} store - The redux store.
|
|
* @param {string} name - The name of the event to send.
|
|
* @param {Object} data - The details/specifics of the event to send determined
|
|
* by/associated with the specified {@code name}.
|
|
* @returns {void}
|
|
*/
|
|
export function sendEvent(store: Object, name: string, data: Object) {
|
|
// The JavaScript App needs to provide uniquely identifying information to
|
|
// the native ExternalAPI module so that the latter may match the former to
|
|
// the native view which hosts it.
|
|
const externalAPIScope = getAppProp(store, 'externalAPIScope');
|
|
|
|
externalAPIScope
|
|
&& NativeModules.ExternalAPI.sendEvent(name, data, externalAPIScope);
|
|
}
|
|
|
|
/**
|
|
* Debounced sending of `readyToClose`.
|
|
*/
|
|
export const _sendReadyToClose = debounce(dispatch => {
|
|
dispatch(readyToClose());
|
|
}, 2500, { leading: true });
|