From d99bf9797d5b7b0db4240e4bb217cde80505be76 Mon Sep 17 00:00:00 2001 From: Vlad Piersec Date: Mon, 24 May 2021 10:17:40 +0300 Subject: [PATCH] fix(vpaas): Avoid url blipping on invite dialog --- react/features/dynamic-branding/functions.js | 10 ++++++++++ react/features/dynamic-branding/reducer.js | 4 ++-- .../add-people-dialog/web/AddPeopleDialog.js | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/react/features/dynamic-branding/functions.js b/react/features/dynamic-branding/functions.js index 2d3b6ddbb..8363f87de 100644 --- a/react/features/dynamic-branding/functions.js +++ b/react/features/dynamic-branding/functions.js @@ -34,3 +34,13 @@ export function getDynamicBrandingUrl(state: Object) { return `${baseUrl}?conferenceFqn=${encodeURIComponent(fqn)}`; } } + +/** + * Selector used for getting the load state of the dynamic branding data. + * + * @param {Object} state - Global state of the app. + * @returns {boolean} + */ +export function isDynamicBrandingDataLoaded(state: Object) { + return state['features/dynamic-branding'].customizationReady; +} diff --git a/react/features/dynamic-branding/reducer.js b/react/features/dynamic-branding/reducer.js index 77edf550b..3921ecdf2 100644 --- a/react/features/dynamic-branding/reducer.js +++ b/react/features/dynamic-branding/reducer.js @@ -32,8 +32,8 @@ const DEFAULT_STATE = { backgroundImageUrl: '', /** - * Flag indicating that the logo (JitsiWatermark) can be displayed. - * This is used in order to avoid image flickering. + * Flag indicating that the branding data can be displayed. + * This is used in order to avoid image flickering / text changing(blipping). * * @public * @type {boolean} diff --git a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js index 78e74d696..d5f32f71e 100644 --- a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js +++ b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js @@ -9,6 +9,7 @@ import { translate } from '../../../../base/i18n'; import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet'; import { connect } from '../../../../base/redux'; import { isVpaasMeeting } from '../../../../billing-counter/functions'; +import { isDynamicBrandingDataLoaded } from '../../../../dynamic-branding/functions'; import EmbedMeetingTrigger from '../../../../embed-meeting/components/EmbedMeetingTrigger'; import { getActiveSession } from '../../../../recording'; import { updateDialInNumbers } from '../../../actions'; @@ -201,7 +202,7 @@ function mapStateToProps(state, ownProps) { _dialIn: dialIn, _embedMeetingVisible: !isVpaasMeeting(state) && isSharingEnabled(sharingFeatures.embed), _dialInVisible: isSharingEnabled(sharingFeatures.dialIn), - _urlSharingVisible: isSharingEnabled(sharingFeatures.url), + _urlSharingVisible: isDynamicBrandingDataLoaded(state) && isSharingEnabled(sharingFeatures.url), _emailSharingVisible: isSharingEnabled(sharingFeatures.email), _invitationText: getInviteText({ state, phoneNumber,