snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
45
react/features/mobile/navigation/functions.tsx
Normal file
45
react/features/mobile/navigation/functions.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import React from 'react';
|
||||
import { GestureResponderEvent } from 'react-native';
|
||||
|
||||
import { IStateful } from '../../base/app/types';
|
||||
import { PREJOIN_PAGE_ENABLED } from '../../base/flags/constants';
|
||||
import { getFeatureFlag } from '../../base/flags/functions';
|
||||
import { toState } from '../../base/redux/functions';
|
||||
import { isPrejoinEnabledInConfig } from '../../prejoin/functions.native';
|
||||
|
||||
import LobbyCloseButton from './components/LobbyCloseButton';
|
||||
import ScreenCloseButton from './components/ScreenCloseButton';
|
||||
|
||||
/**
|
||||
* Close icon/text button based on platform.
|
||||
*
|
||||
* @param {Function} goBack - Goes back to the previous screen function.
|
||||
* @returns {React.Component}
|
||||
*/
|
||||
export function screenHeaderCloseButton(goBack: (e?: GestureResponderEvent | React.MouseEvent) => void) {
|
||||
return () => <ScreenCloseButton goBack = { goBack } />;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the {@code Prejoin page} is enabled by the app itself
|
||||
* (e.g. Programmatically via the Jitsi Meet SDK for Android and iOS).
|
||||
*
|
||||
* @param {Function|Object} stateful - The redux state or {@link getState}
|
||||
* function.
|
||||
* @returns {boolean} If the {@code Prejoin} is enabled by the app, then
|
||||
* {@code true}; otherwise, {@code false}.
|
||||
*/
|
||||
export function isPrejoinPageEnabled(stateful: IStateful) {
|
||||
const state = toState(stateful);
|
||||
|
||||
return getFeatureFlag(state, PREJOIN_PAGE_ENABLED, isPrejoinEnabledInConfig(state));
|
||||
}
|
||||
|
||||
/**
|
||||
* Close icon/text button for lobby screen based on platform.
|
||||
*
|
||||
* @returns {React.Component}
|
||||
*/
|
||||
export function lobbyScreenHeaderCloseButton() {
|
||||
return LobbyCloseButton;
|
||||
}
|
||||
Reference in New Issue
Block a user