fix(mobile,navigation) remove end meeting page
It will just flash for a split second and all it does is dispatch readyToClose, so do it directly instead.
This commit is contained in:
parent
a3c60d5943
commit
21083e6777
|
@ -39,9 +39,6 @@
|
||||||
"audioOnly": {
|
"audioOnly": {
|
||||||
"audioOnly": "Low bandwidth"
|
"audioOnly": "Low bandwidth"
|
||||||
},
|
},
|
||||||
"blankPage": {
|
|
||||||
"meetingEnded": "Meeting ended."
|
|
||||||
},
|
|
||||||
"breakoutRooms": {
|
"breakoutRooms": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"add": "Add breakout room",
|
"add": "Add breakout room",
|
||||||
|
|
|
@ -7,7 +7,6 @@ import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||||
|
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { DialInSummary } from '../../../invite';
|
import { DialInSummary } from '../../../invite';
|
||||||
import EndMeetingPage from '../../../welcome/components/EndMeetingPage';
|
|
||||||
import { rootNavigationRef } from '../rootNavigationContainerRef';
|
import { rootNavigationRef } from '../rootNavigationContainerRef';
|
||||||
import { screen } from '../routes';
|
import { screen } from '../routes';
|
||||||
import {
|
import {
|
||||||
|
@ -71,13 +70,6 @@ const RootNavigationContainer = ({ isWelcomePageAvailable }: Props) => {
|
||||||
gestureEnabled: false,
|
gestureEnabled: false,
|
||||||
headerShown: false
|
headerShown: false
|
||||||
}} />
|
}} />
|
||||||
<RootStack.Screen
|
|
||||||
component = { EndMeetingPage }
|
|
||||||
name = { screen.endMeeting }
|
|
||||||
options = {{
|
|
||||||
gestureEnabled: false,
|
|
||||||
headerShown: false
|
|
||||||
}} />
|
|
||||||
</RootStack.Navigator>
|
</RootStack.Navigator>
|
||||||
</NavigationContainer>
|
</NavigationContainer>
|
||||||
</SafeAreaProvider>
|
</SafeAreaProvider>
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
|
import debounce from 'lodash/debounce';
|
||||||
|
|
||||||
import { SET_ROOM } from '../../base/conference/actionTypes';
|
import { SET_ROOM } from '../../base/conference/actionTypes';
|
||||||
import { MiddlewareRegistry } from '../../base/redux';
|
import { MiddlewareRegistry } from '../../base/redux';
|
||||||
|
import { readyToClose } from '../external-api/actions';
|
||||||
|
|
||||||
|
|
||||||
import { isWelcomePageAppEnabled } from './components/welcome/functions';
|
import { isWelcomePageAppEnabled } from './components/welcome/functions';
|
||||||
import { navigateRoot } from './rootNavigationContainerRef';
|
import { navigateRoot } from './rootNavigationContainerRef';
|
||||||
|
@ -17,6 +21,12 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
return next(action);
|
return next(action);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debounced sending of `readyToClose`.
|
||||||
|
*/
|
||||||
|
const _sendReadyToClose = debounce(dispatch => {
|
||||||
|
dispatch(readyToClose());
|
||||||
|
}, 2500, { leading: true });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies the feature base/conference that the action
|
* Notifies the feature base/conference that the action
|
||||||
|
@ -32,11 +42,11 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
* @private
|
* @private
|
||||||
* @returns {Object} The value returned by {@code next(action)}.
|
* @returns {Object} The value returned by {@code next(action)}.
|
||||||
*/
|
*/
|
||||||
function _setRoom(store, next, action) {
|
function _setRoom({ dispatch, getState }, next, action) {
|
||||||
const { room: oldRoom } = store.getState()['features/base/conference'];
|
const { room: oldRoom } = getState()['features/base/conference'];
|
||||||
const result = next(action);
|
const result = next(action);
|
||||||
const { room: newRoom } = store.getState()['features/base/conference'];
|
const { room: newRoom } = getState()['features/base/conference'];
|
||||||
const isWelcomePageEnabled = isWelcomePageAppEnabled(store.getState());
|
const isWelcomePageEnabled = isWelcomePageAppEnabled(getState());
|
||||||
|
|
||||||
if (!oldRoom && newRoom) {
|
if (!oldRoom && newRoom) {
|
||||||
navigateRoot(screen.conference.root);
|
navigateRoot(screen.conference.root);
|
||||||
|
@ -45,7 +55,7 @@ function _setRoom(store, next, action) {
|
||||||
navigateRoot(screen.root);
|
navigateRoot(screen.root);
|
||||||
} else {
|
} else {
|
||||||
// For JitsiSDK, WelcomePage is not available
|
// For JitsiSDK, WelcomePage is not available
|
||||||
navigateRoot(screen.endMeeting);
|
_sendReadyToClose(dispatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,5 @@ export const screen = {
|
||||||
invite: 'Invite',
|
invite: 'Invite',
|
||||||
sharedDocument: 'Shared document'
|
sharedDocument: 'Shared document'
|
||||||
},
|
},
|
||||||
lobby: 'Lobby',
|
lobby: 'Lobby'
|
||||||
endMeeting: 'End'
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
// @flow
|
|
||||||
|
|
||||||
import React, { useEffect } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { Text, View } from 'react-native';
|
|
||||||
import { useDispatch } from 'react-redux';
|
|
||||||
|
|
||||||
import { readyToClose } from '../../mobile/external-api/actions';
|
|
||||||
|
|
||||||
import styles from './styles';
|
|
||||||
|
|
||||||
|
|
||||||
const BlankPage = () => {
|
|
||||||
const dispatch = useDispatch();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Destroys the local tracks (if any) since no media is desired when this
|
|
||||||
* component is rendered.
|
|
||||||
*/
|
|
||||||
useEffect(() => {
|
|
||||||
dispatch(readyToClose());
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View style = { styles.blankPageWrapper }>
|
|
||||||
<Text style = { styles.blankPageText }>
|
|
||||||
{ t('blankPage.meetingEnded') }
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default BlankPage;
|
|
Loading…
Reference in New Issue