mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(toolbox/native): custom overflow menu buttons (#14594)
* feat(toolbox/native): custom buttons for the OverflowMenu
This commit is contained in:
@@ -57,7 +57,10 @@ import { ENTER_PICTURE_IN_PICTURE } from '../picture-in-picture/actionTypes';
|
||||
// @ts-ignore
|
||||
import { isExternalAPIAvailable } from '../react-native-sdk/functions';
|
||||
|
||||
import { READY_TO_CLOSE } from './actionTypes';
|
||||
import {
|
||||
CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
READY_TO_CLOSE
|
||||
} from './actionTypes';
|
||||
import { setParticipantsWithScreenShare } from './actions';
|
||||
import { participantToParticipantInfo, sendEvent } from './functions';
|
||||
import logger from './logger';
|
||||
@@ -79,6 +82,12 @@ const CHAT_TOGGLED = 'CHAT_TOGGLED';
|
||||
*/
|
||||
const CONFERENCE_TERMINATED = 'CONFERENCE_TERMINATED';
|
||||
|
||||
/**
|
||||
* Event which will be emitted on the native side to indicate that the custom overflow menu button was pressed.
|
||||
*/
|
||||
const CUSTOM_MENU_BUTTON_PRESSED = 'CUSTOM_MENU_BUTTON_PRESSED';
|
||||
|
||||
|
||||
/**
|
||||
* Event which will be emitted on the native side to indicate a message was received
|
||||
* through the channel.
|
||||
@@ -185,6 +194,20 @@ externalAPIEnabled && MiddlewareRegistry.register(store => next => action => {
|
||||
break;
|
||||
}
|
||||
|
||||
case CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED: {
|
||||
const { id, text } = action;
|
||||
|
||||
sendEvent(
|
||||
store,
|
||||
CUSTOM_MENU_BUTTON_PRESSED,
|
||||
{
|
||||
id,
|
||||
text
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ENDPOINT_MESSAGE_RECEIVED: {
|
||||
const { participant, data } = action;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user