Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(mobile,navigation) remove end meeting page

Saúl Ibarra Corretgé21083e677763
diff --git a/lang/main.json b/lang/main.json
index 353eda899f..1b03f17d9b 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -39,9 +39,6 @@
"audioOnly": {
"audioOnly": "Low bandwidth"
},
- "blankPage": {
- "meetingEnded": "Meeting ended."
- },
"breakoutRooms": {
"actions": {
"add": "Add breakout room",
diff --git a/react/features/mobile/navigation/components/RootNavigationContainer.js b/react/features/mobile/navigation/components/RootNavigationContainer.js
index bd361f365d..0c82069df9 100644
--- a/react/features/mobile/navigation/components/RootNavigationContainer.js
+++ b/react/features/mobile/navigation/components/RootNavigationContainer.js
@@ -7,7 +7,6 @@ import { SafeAreaProvider } from 'react-native-safe-area-context';
import { connect } from '../../../base/redux';
import { DialInSummary } from '../../../invite';
-import EndMeetingPage from '../../../welcome/components/EndMeetingPage';
import { rootNavigationRef } from '../rootNavigationContainerRef';
import { screen } from '../routes';
import {
@@ -71,13 +70,6 @@ const RootNavigationContainer = ({ isWelcomePageAvailable }: Props) => {
gestureEnabled: false,
headerShown: false
}} />
- <RootStack.Screen
- component = { EndMeetingPage }
- name = { screen.endMeeting }
- options = {{
- gestureEnabled: false,
- headerShown: false
- }} />
</RootStack.Navigator>
</NavigationContainer>
</SafeAreaProvider>
diff --git a/react/features/mobile/navigation/middleware.js b/react/features/mobile/navigation/middleware.js
index 763e4cbe73..2050bb35c0 100644
--- a/react/features/mobile/navigation/middleware.js
+++ b/react/features/mobile/navigation/middleware.js
@@ -1,7 +1,11 @@
// @flow
+import debounce from 'lodash/debounce';
+
import { SET_ROOM } from '../../base/conference/actionTypes';
import { MiddlewareRegistry } from '../../base/redux';
+import { readyToClose } from '../external-api/actions';
+
import { isWelcomePageAppEnabled } from './components/welcome/functions';
import { navigateRoot } from './rootNavigationContainerRef';
@@ -17,6 +21,12 @@ MiddlewareRegistry.register(store => 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
@@ -32,11 +42,11 @@ MiddlewareRegistry.register(store => next => action => {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
-function _setRoom(store, next, action) {
- const { room: oldRoom } = store.getState()['features/base/conference'];
+function _setRoom({ dispatch, getState }, next, action) {
+ const { room: oldRoom } = getState()['features/base/conference'];
const result = next(action);
- const { room: newRoom } = store.getState()['features/base/conference'];
- const isWelcomePageEnabled = isWelcomePageAppEnabled(store.getState());
+ const { room: newRoom } = getState()['features/base/conference'];
+ const isWelcomePageEnabled = isWelcomePageAppEnabled(getState());
if (!oldRoom && newRoom) {
navigateRoot(screen.conference.root);
@@ -45,7 +55,7 @@ function _setRoom(store, next, action) {
navigateRoot(screen.root);
} else {
// For JitsiSDK, WelcomePage is not available
- navigateRoot(screen.endMeeting);
+ _sendReadyToClose(dispatch);
}
}
diff --git a/react/features/mobile/navigation/routes.js b/react/features/mobile/navigation/routes.js
index 5d984da444..bd1b5c9268 100644
--- a/react/features/mobile/navigation/routes.js
+++ b/react/features/mobile/navigation/routes.js
@@ -33,6 +33,5 @@ export const screen = {
invite: 'Invite',
sharedDocument: 'Shared document'
},
- lobby: 'Lobby',
- endMeeting: 'End'
+ lobby: 'Lobby'
};
diff --git a/react/features/welcome/components/EndMeetingPage.js b/react/features/welcome/components/EndMeetingPage.js
deleted file mode 100644
index db3b340751..0000000000
--- a/react/features/welcome/components/EndMeetingPage.js
+++ /dev/null
@@ -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;