Skip to content

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

feat(native-participants-pane) simplified props for hiding header with navigation

Calin Chitu24550777c686
diff --git a/react/features/base/modal/components/JitsiModal.js b/react/features/base/modal/components/JitsiModal.js
index d61cc86e78..d945ec8fc3 100644
--- a/react/features/base/modal/components/JitsiModal.js
+++ b/react/features/base/modal/components/JitsiModal.js
@@ -50,6 +50,11 @@ type Props = {
*/
headerProps: Object,
+ /**
+ * True if the header with navigation should be hidden, false otherwise.
+ */
+ hideHeaderWithNavigation?: boolean,
+
/**
* The ID of the modal that is being rendered. This is used to show/hide the modal.
*/
@@ -66,11 +71,6 @@ type Props = {
*/
position?: string,
- /**
- * True if the header with navigation should be shown, false otherwise.
- */
- showHeaderWithNavigation: boolean,
-
/**
* Additional style to be appended to the View containing the content of the modal.
*/
@@ -83,7 +83,8 @@ type Props = {
*/
class JitsiModal extends PureComponent<Props> {
static defaultProps = {
- position: 'bottom'
+ position: 'bottom',
+ hideHeaderWithNavigation: false
};
/**
@@ -111,7 +112,7 @@ class JitsiModal extends PureComponent<Props> {
footerComponent,
headerProps,
position,
- showHeaderWithNavigation,
+ hideHeaderWithNavigation,
style
} = this.props;
@@ -132,10 +133,10 @@ class JitsiModal extends PureComponent<Props> {
_styles.page,
style
] }>
- {showHeaderWithNavigation
- && <HeaderWithNavigation
+ <HeaderWithNavigation
{ ...headerProps }
- onPressBack = { this._onRequestClose } />}
+ hideHeaderWithNavigation = { hideHeaderWithNavigation }
+ onPressBack = { this._onRequestClose } />
<SafeAreaView style = { styles.safeArea }>
{ children }
</SafeAreaView>
diff --git a/react/features/base/react/components/native/HeaderWithNavigation.js b/react/features/base/react/components/native/HeaderWithNavigation.js
index 6619c51f7c..cd2e6e5ba1 100644
--- a/react/features/base/react/components/native/HeaderWithNavigation.js
+++ b/react/features/base/react/components/native/HeaderWithNavigation.js
@@ -27,6 +27,11 @@ type Props = {
*/
headerLabelKey: ?string,
+ /**
+ * True if the header with navigation should be hidden, false otherwise.
+ */
+ hideHeaderWithNavigation?: boolean,
+
/**
* Callback to be invoked on pressing the back button.
*/
@@ -48,17 +53,22 @@ class HeaderWithNavigation extends Component<Props> {
* @inheritdoc
*/
render() {
- const { onPressBack, onPressForward } = this.props;
+ const { hideHeaderWithNavigation, onPressBack, onPressForward } = this.props;
return (
- <Header>
- { onPressBack && <BackButton onPress = { onPressBack } /> }
- <HeaderLabel labelKey = { this.props.headerLabelKey } />
- { onPressForward && <ForwardButton
- disabled = { this.props.forwardDisabled }
- labelKey = { this.props.forwardLabelKey }
- onPress = { onPressForward } /> }
- </Header>
+ <>
+ {
+ !hideHeaderWithNavigation
+ && <Header>
+ { onPressBack && <BackButton onPress = { onPressBack } /> }
+ <HeaderLabel labelKey = { this.props.headerLabelKey } />
+ { onPressForward && <ForwardButton
+ disabled = { this.props.forwardDisabled }
+ labelKey = { this.props.forwardLabelKey }
+ onPress = { onPressForward } /> }
+ </Header>
+ }
+ </>
);
}
}
diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.js
index 39e232cc37..b1159a5c98 100644
--- a/react/features/chat/components/native/Chat.js
+++ b/react/features/chat/components/native/Chat.js
@@ -44,8 +44,7 @@ class Chat extends AbstractChat<Props> {
headerLabelKey: 'chat.title'
}}
modalId = { CHAT_VIEW_MODAL_ID }
- onClose = { this._onClose }
- showHeaderWithNavigation = { true }>
+ onClose = { this._onClose }>
<MessageContainer messages = { this.props._messages } />
<MessageRecipient />
diff --git a/react/features/etherpad/components/native/SharedDocument.js b/react/features/etherpad/components/native/SharedDocument.js
index a191d7bd73..11cdf07b97 100644
--- a/react/features/etherpad/components/native/SharedDocument.js
+++ b/react/features/etherpad/components/native/SharedDocument.js
@@ -78,7 +78,6 @@ class SharedDocument extends PureComponent<Props> {
headerLabelKey: 'documentSharing.title'
}}
modalId = { SHARE_DOCUMENT_VIEW_ID }
- showHeaderWithNavigation = { true }
style = { styles.webView }>
<WebView
onError = { this._onError }
diff --git a/react/features/help/components/HelpView.js b/react/features/help/components/HelpView.js
index 390e3b0b86..c3a4fcadc3 100644
--- a/react/features/help/components/HelpView.js
+++ b/react/features/help/components/HelpView.js
@@ -33,8 +33,7 @@ class HelpView extends PureComponent<Props> {
headerProps = {{
headerLabelKey: 'helpView.header'
}}
- modalId = { HELP_VIEW_MODAL_ID }
- showHeaderWithNavigation = { true }>
+ modalId = { HELP_VIEW_MODAL_ID }>
<WebView source = {{ uri: this.props._url }} />
</JitsiModal>
);
diff --git a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
index b53ba43380..c03313d071 100644
--- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
+++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
@@ -176,8 +176,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
headerLabelKey: 'inviteDialog.header',
onPressForward: this._onInvite
}}
- modalId = { ADD_PEOPLE_DIALOG_VIEW_ID }
- showHeaderWithNavigation = { true }>
+ modalId = { ADD_PEOPLE_DIALOG_VIEW_ID }>
<View
style = { styles.searchFieldWrapper }>
<View style = { styles.searchIconWrapper }>
diff --git a/react/features/invite/components/dial-in-summary/native/DialInSummary.js b/react/features/invite/components/dial-in-summary/native/DialInSummary.js
index 0f4825240f..fa87ca9c41 100644
--- a/react/features/invite/components/dial-in-summary/native/DialInSummary.js
+++ b/react/features/invite/components/dial-in-summary/native/DialInSummary.js
@@ -58,7 +58,6 @@ class DialInSummary extends Component<Props> {
headerLabelKey: 'info.label'
}}
modalId = { DIAL_IN_SUMMARY_VIEW_ID }
- showHeaderWithNavigation = { true }
style = { styles.backDrop }>
<WebView
onError = { this._onError }
diff --git a/react/features/participants-pane/components/native/ParticipantsPane.js b/react/features/participants-pane/components/native/ParticipantsPane.js
index f48b7a46a3..c1a09aff80 100644
--- a/react/features/participants-pane/components/native/ParticipantsPane.js
+++ b/react/features/participants-pane/components/native/ParticipantsPane.js
@@ -32,7 +32,7 @@ export function ParticipantsPane() {
return (
<JitsiModal
- showHeaderWithNavigation = { false }
+ hideHeaderWithNavigation = { true }
style = { styles.participantsPane }>
<View style = { styles.header }>
<Button
diff --git a/react/features/settings/components/native/SettingsView.js b/react/features/settings/components/native/SettingsView.js
index 1899e38ca6..89901a373a 100644
--- a/react/features/settings/components/native/SettingsView.js
+++ b/react/features/settings/components/native/SettingsView.js
@@ -158,8 +158,7 @@ class SettingsView extends AbstractSettingsView<Props, State> {
headerLabelKey: 'settingsView.header'
}}
modalId = { SETTINGS_VIEW_ID }
- onClose = { this._onClose }
- showHeaderWithNavigation = { true }>
+ onClose = { this._onClose }>
<ScrollView>
<FormSectionAccordion
accordion = { false }